Skip to main content

database.write

info

Make sure to use unique names for your DB keys to avoid conflicts with other scripts. For example, prefer "gamesense_watermark_position" over something generic like "position"

database.write

Writes a value to the database. Avoid calling this often. For example, call read at script load, then call write during the 'shutdown' event

database.write(key_name: string, value)

Arguments

NameDescriptionType
key_nameString used as a name of the key.string
valueValue the key should be set to. This can be anything that can be sanitized (no functions, userdata). Tables are allowed and encouraged to reduce the amount of database keys your script needs.unknown