Stores a key-value pair into the internal database and invokes a callback. Key-Value pairs are unique
to the current plugin and overwrite if a duplicate key is provided. Overwriting
an existing key with a nil value deletes the entry from the database.
Parameters
key: string
The unique string used as a key to index the value provided.
value: any
The value that is stored to database and associated with the provided key.
The callback function that is invoked with a boolean
representing whether the value was successfully set.
Returns void
Example
-- InvoketheSetFunction osrs.Persistence.setValue("Example Key", "Example Value", function(key, success) if(success) then osrs.print("Set Value succeeded.") else osrs.print("Set Value failed.") end end )
Stores a key-value pair into the internal database and invokes a callback. Key-Value pairs are unique to the current plugin and overwrite if a duplicate key is provided. Overwriting an existing key with a nil value deletes the entry from the database.