global.get 3
Get the value of a stored global variable
Return value
Return Type | Description |
---|---|
any | The variable that was stored. Expected types: bool, float, int, string. If the variable was never set, returns nil. |
Parameters
Parameter | Type | Description |
---|---|---|
1 | string | Identifier to get the stored value |
Examples
-- retrieve a stored global numeric value
local somenumber = global.get("some_stored_integer")
-- retrieve a stored global boolean value
local someboolean = global.get("some_stored_bool")
-- retrieve a stored global text value
local sometext = global.get("some_stored_text")