Jump to content

[FIXED] Escape in Quest


Recommended Posts

  • Premium

Hey,

I work on multilang in quest. But i dont know, how i can escape in "quest lang".

I have now:

local s=select ( "Porneşte evenimentul", "Opreşte evenimentul", "Şansă aruncare", "Ieşire" )

And i need add:

translate [ pc . get_language ( ) ] . fotbal . _1button

Intro one button etc.

In PHP is escape like '.for_example.' ...but how i can escape in local by quest?

OR can i doing like this:

 

local s=select ( translate [ pc . get_language ( ) ] . fotbal . _1button, translate [ pc . get_language ( ) ] . fotbal . _2button, translate [ pc . get_language ( ) ] . fotbal . _3button, translate [ pc . get_language ( ) ] . fotbal . _4button )

Thank 🙂

Edited by matyasvane
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Contributor

I see the title is marked as fixed, but I'll leave this here, in case someone else is looking for it.

You're not looking for escaping, you're looking for string concatenation, which can be done with two dots.

ex:
"some string" .. some_var .. "some other string"

You can read more here:

https://www.lua.org/pil/3.4.html

Edited by Amun
Link to comment
Share on other sites

  • Premium
52 minutes ago, Amun said:

I see the title is marked as fixed, but I'll leave this here, in case someone else is looking for it.

You're not looking for escaping, you're looking for string concatenation, which can be done with two dots.

ex:
"some string" .. some_var .. "some other string"

You can read more here:

https://www.lua.org/pil/3.4.html

Yes, i fix it with this:

 

local s=select (gameforge[pc.get_language()].fotbal._1button, gameforge[pc.get_language()].fotbal._2button, gameforge[pc.get_language()].fotbal._3button, gameforge[pc.get_language()].fotbal._4button)

and sorry @ VegaS™ i using some time google translate, and this for now translate my text what i wroten in eng to text window. 😉

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.