database
Persistent storage engine that lets you store values between reloads / reinjects
Last updated
Persistent storage engine that lets you store values between reloads / reinjects
Last updated
database.read(key_name: string)
: any
Argument | Type | Description |
---|---|---|
Gets a value from the database
database.write(key_name: string, value: any)
Argument | Type | Description |
---|---|---|
Writes a value to the database. Avoid calling this often. For example, call read at script load, then call write during the 'shutdown' event
key_name
string
String used as a name of the key. Make sure to write to the same key_name.
key_name
string
String used as a name of the key.
value
any
Value the key should be set to. This can be anything that can be sanitized (no functions, userdata)