This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
string [2017/06/01 07:11] – justin | string [2020/01/17 19:00] – justin | ||
---|---|---|---|
Line 10: | Line 10: | ||
The above example demonstrates a string passed to the [[Display Message]] function as an argument. | The above example demonstrates a string passed to the [[Display Message]] function as an argument. | ||
+ | |||
+ | <WRAP center round info 100%> | ||
+ | **Note:** Any double quotation marks within a string (excluding the quotation marks used to enclose it) must be escaped with a preceding backslash. | ||
+ | </ | ||
====Example: | ====Example: | ||
<code lua> | <code lua> | ||
- | set_entity_property(entity[" | + | set_entity_property(entity[" |
</ | </ | ||
The above example demonstrates 3 different cases of a string being used: an entity name reference, the name of the property, and a text value to store in the property. | The above example demonstrates 3 different cases of a string being used: an entity name reference, the name of the property, and a text value to store in the property. | ||
+ | |||
+ | =====String Concatenation===== | ||
+ | Strings can be concatenated, | ||
+ | |||
+ | ====Example: | ||
+ | <code lua> | ||
+ | display_message(" | ||
+ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ |