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 08:57] – justin | string [2020/01/17 19:00] – justin | ||
---|---|---|---|
Line 11: | Line 11: | ||
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 warning | + | <WRAP center round info 100%> |
- | Any double quotation marks within a string must be escaped with a backslash. | + | **Note: |
</ | </ | ||
====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~~ |