Load (PluginData)

From LoTROInterface Wiki

Jump to: navigation, search


Loads plugin data from a given key.

Syntax

Lua
function PluginData.Load(dataScope, key, dataLoadEventHandler);

Parameters

dataScope
Type: DataScope
The scope of the data. Data scope can be specified to an Account, a Server, or to a specific Character.


key
Type: string
The key the data is stored under.


dataLoadEventHandler
Type: Object
A function that is called when the data loaded.

Returns

Type: Object
The loaded data. If the data does not exist, this will simply return nil.

Remarks

This method deserializes object data. If the data is immediately available it will be returned. If the data is not immediately available this will return nil and the data loaded handler will be invoked later once the data is available.

Example

   local settings = Turbine.PluginData.Load( 
       Turbine.DataScope.Account, 
       "MyPluginSettings");

Personal tools