wiki.sine.space | sinespace

Difference between revisions of "Scripting/Server/SDatabase"

From wiki.sine.space
Jump to: navigation, search
(Created page with " =Public Member Functions= {{ScriptFunction|void|GetRegionValue(string key, Closure onResult);|Get a value stored in the region database using the first string parameter as a...")
 
Line 2: Line 2:
 
=Public Member Functions=
 
=Public Member Functions=
  
{{ScriptFunction|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. |5=<pre>Space.Database.GetRegionValue("testKey",OnCompleteFunction)</pre>|6=<pre></pre>}}
+
{{ScriptFunction|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. |5=<pre>Space.Database.GetRegionValue("testKey",OnCompleteFunction)</pre>|6=<pre></pre>}}
  
{{ScriptFunction|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.|5=<pre>Space.Database.SetRegionValue("testKey", "testValue",OnCompleteFunction)</pre>|6=<pre></pre>}}
+
{{ScriptFunction|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.|5=<pre>Space.Database.SetRegionValue("testKey", "testValue",OnCompleteFunction)</pre>|6=<pre></pre>}}
  
{{ScriptFunction|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. |5=<pre>Space.Database.GetPlayerValue(aPlayerID,"testKey",OnCompleteFunction)</pre>|6=<pre></pre>}}
+
{{ScriptFunction|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. |5=<pre>Space.Database.GetPlayerValue(aPlayerID,"testKey",OnCompleteFunction)</pre>|6=<pre></pre>}}
  
{{ScriptFunction|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.|5=<pre>Space.Database.SetPlayerValue(aPlayerID,"testKey", "testValue",OnCompleteFunction)</pre>|6=<pre></pre>}}
+
{{ScriptFunction|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.|5=<pre>Space.Database.SetPlayerValue(aPlayerID,"testKey", "testValue",OnCompleteFunction)</pre>|6=<pre></pre>}}
  
  
 
{{Scripting Navbox}}
 
{{Scripting Navbox}}

Revision as of 18:45, 24 February 2022

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)