Beta Documentation - Subject to change.

Saves plugin data under a given key.

Syntax

Lua
function PluginData.Save(dataScope, key, data, saveCompleteEventHandler);

Parameters

dataScope
Type: number
The scope of the data. This specifies the level of availability of this data when loading. Data scope can be specified to an Account, a Server, or to a specific Character.
key
Type: string
The key to store the data under.
data
Type: Object
The data to save.
saveCompleteEventHandler
Type: Object
Event handler called when the data is saved. It has two arguments, the first specifies if the save succeeded and the second is a message if it failed.

Remarks

This method serializes the object data passed to the specified key. Any existing data is replaced with the new data.

See Also