The unique string used to identify the key-value pair that the value should be returned from.
The callback function that is invoked with the provided key and retrieved value.
-- Invoke the Set Function
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
)
-- Invoke the Get Function
osrs.Persistence.getValue("Example Key",
function(key, callbackValue)
-- prints "The provided key was Example Key"
osrs.print("The provided key was " .. key)
-- prints "The retrieved value was Example Value"
osrs.print("The retrieved value was " .. callbackValue)
end
)
Retrieves a value paired with the provided key from the plugin's key-value entries in the internal database as a string and invokes a callback with the value as a string. This function can only find key-value entries from the current plugin. If no such key exists, retrieves a nil object.