What it does
Reads a text property of the script, as set in the editor.
Syntax
1
PropString(property string) → string2
PropString(property string, default string) → stringParameters
| Name | Type | In forms | Meaning |
|---|---|---|---|
| property | string | all | The property's name. |
| default | string | 2 | The value returned when the property does not exist. |
Every form returns
string
The property as text. Returns an empty string, or default, when the property is missing.
Good to know
- Without
default, a missing property also writes one warning to the console, once per name.
Example · generated
Form 1, the short one
DO Print(PropString("value")) Sync()LOOPForm 2, with every argument
DO Print(PropString("value", "value")) Sync()LOOPPropString is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.