Write tokens that cannot be misread
On this page
| Write this | Avoid assuming this |
|---|---|
| $$visitor_name | A display name with spaces can replace the variable ID. |
| @PlayerName | @playername is the same spelling. It is not. |
| $$score points | $$scorepoints means score followed by points. It asks for a different variable. |
| Score: $$score. | A punctuation mark after the variable is part of its ID. The period is separate. |
| A script computes a value first. | $$score + 5 performs arithmetic. The + 5 is ordinary displayed text. |
| The exact variable key | The wildcard automatically reads a property such as $$player.health. |
| An output label with a token | An editable text box expands the same token. Its contents stay literal. |
Choose clear variable IDs#
The dollar form recognises a letter or underscore first, then letters, numbers or underscores. Use IDs such as visitor_name, score and clue_count. Avoid a leading digit, spaces or dots for values you intend to display this way.
Keep inserted values straightforward#
A wildcard converts the stored value to text. It does not loop through an Array and create a polished list, format a date or choose singular/plural wording. Build a display String in a script when you need those choices.
Do not rely on nested token expansion. Keep your source sentence in the label and ordinary player-facing words in its variables. That is easier to translate and much easier to diagnose.
The runtime also accepts a legacy variable key beginning with one dollar sign as a fallback for the $$ form. For new work, use ordinary IDs such as score and let $$ be the display marker.
