LoadSharedVariable

Family: Extras · One form

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) → string

Parameters

NameType
varNamestring
defaultValuestring

Every form returns

string

Example · generated

sharedVariable = LoadSharedVariable("player", "value")DO  Sync()LOOP

LoadSharedVariable 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.

21 commands in Extras