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/05/30 11:23] – justin | string [2017/06/01 09:00] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | A **string** is a scripting data type consisting of a string of characters enclosed by double quotes on each end. Strings are typically used to represent a message, for example in the [[Display Message]] function, or when referencing an entity name or property name within a script. [[Placeholder expressions]] can be used within a string as a way to generate dynamic values at game runtime. | + | A **string** is a scripting data type consisting of a string of characters enclosed by double quotes on each end. Strings are typically used to represent a message, for example in the [[Display Message]] function, or when referencing an entity name or property name within a script. [[placeholder_expression|Placeholder expressions]] can be used within a string as a way to generate dynamic values at game runtime. |
====Example: | ====Example: | ||
Line 9: | Line 9: | ||
</ | </ | ||
- | The above example | + | The above example |
+ | |||
+ | <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 | + | The above example demonstrates 3 different |
~~NOTOC~~ | ~~NOTOC~~ |