What it does
LoadSharedVariable writes to an Extras object: it loads rather than reads. It takes varName (a string) and defaultValue (a string), and answers a string.
Syntax
LoadSharedVariable(varName string, defaultValue string) → stringParameters
| Name | Type |
|---|---|
| varName | string |
| defaultValue | string |
Every form returns
string
Example · generated
sharedVariable = LoadSharedVariable("player", "value")DO Sync()LOOPLoadSharedVariable 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.