wiki.sine.space | sinespace

Scripting/Server/SDatabase

From wiki.sine.space
Revision as of 18:45, 24 February 2022 by Voidtech (Talk | contribs)

Jump to: navigation, search

Public Member Functions

GetRegionValue

void GetRegionValue (string key, Closure onResult);

Get a value stored in the region database using the first string parameter as a key and the second parameter as a function that will be called when the operation is complete.

Space.Database.GetRegionValue("testKey",OnCompleteFunction)


SetRegionValue

void SetRegionValue (string key, string value, Closure onSave);

Store a "value" in the region database using the "key" and bind a function that will be called when the operation is complete.

Space.Database.SetRegionValue("testKey", "testValue",OnCompleteFunction)


GetPlayerValue

void GetPlayerValue (int player, string key, Closure onResult);

Get a value stored in a player's database with player ID "player" and "key". The final parameter is a function that will be called when the operation is complete.

Space.Database.GetPlayerValue(aPlayerID,"testKey",OnCompleteFunction)


SetPlayerValue

void SetPlayerValue (int player, string key, string value, Closure onSave);

Store a "value" in a player's database player ID "player" and "key". The final parameter is a function that will be called when the operation is complete.

Space.Database.SetPlayerValue(aPlayerID,"testKey", "testValue",OnCompleteFunction)