GetStorageValue: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.4.2}} {{FuncDescription|Can be used to save/read a variable/value on the client. Useful for some settings. Values can be retrieved with GetStorage..."
 
No edit summary
 
Line 21: Line 21:


{{RelatedFunctions}}
{{RelatedFunctions}}
*[[SetStorageValue]]
*[[GetStorageValue]]
*[[GetStorageValue]]
*[[GetGameVersion]]
*[[GetGameVersion]]

Latest revision as of 18:12, 21 January 2021

GetStorageValue

Type: Function
Context: Client
Introduced: v1.4.2

Description

Can be used to save/read a variable/value on the client. Useful for some settings.

Values can be retrieved with GetStorageValue.

Syntax

GetStorageValue(key)

Parameters

  • key
    The name of this value.

Return Value

  • Returns the value that has bee set for this key. If it does not exist "nil" (nothing) will be returned.

Example

print(GetStorageValue("var_str"))
print(GetStorageValue("var_int"))
print(GetStorageValue("var_float"))
print(GetStorageValue("var_bool"))

See also