|
|
Line 1: |
Line 1: |
− | | + | This page has moved to: https://docs.sine.space/v/scripting/server-scripting/network/sshared |
− | =Members=
| + | |
− | {{ScriptFunction|void|SetGlobal|(string namespace, string key, DynValue value);|Sets a global key to a value. The value can be any object type.|5=
| + | |
− | '''Space.Shared.SetGlobal'''("com.someNameHere.world", "version", "1.02"); |6=}}
| + | |
− | | + | |
− | {{ScriptFunction|DynValue|GetGlobal|(string namespace, string key);|Retrieves a previously set global variable, or returns nil.|5=
| + | |
− | local versionValue = '''Space.Shared.GetGlobal'''("com.someNameHere.world", "version")|6=}}
| + | |
− | | + | |
− | {{ScriptFunction|void|RegisterFunction|(string ns, string func, Closure reference);|Makes func into a global function that can be accessed anywhere.|5=
| + | |
− | function someFunction(name)
| + | |
− | Space.Log("Hello " .. name);<br>
| + | |
− | end<br><br>
| + | |
− | | + | |
− | '''Space.Shared.RegisterFunction'''("com.someNameHere.world", "func", someFunction);
| + | |
− | |6=}}
| + | |
− | | + | |
− | {{ScriptFunction|void|CallFunction|(string ns, string func, IEnumerable< DynValue > args);|Calls the registered function with the specified arguments.|5=
| + | |
− | '''Space.Shared.CallFunction'''("com.someNameHere.world", "func",{"Smith"}); |6=}}
| + | |
− | | + | |
− | {{ScriptFunction|void|RegisterBroadcastFunction|(string ns, string func, Closure reference);|Makes func into a global function that can be accessed anywhere.|5=
| + | |
− | function someFunction(name)
| + | |
− | Space.Log("Hello " .. name);<br>
| + | |
− | end<br><br>
| + | |
− | | + | |
− | '''Space.Shared.RegisterBroadcastFunction'''("com.someNameHere.world", "func", someFunction);}}
| + | |
− | | + | |
− | | + | |
− | {{ScriptFunction|int|CallBroadcastFunction|((string ns, string func, IEnumerable< DynValue > args);|Calls every registered broadcast function with the specified arguments, and returns the number of calls queued.|5=}}
| + | |
− | | + | |
− | {{ScriptFunction|int|UnregisterBroadcastFunction|(string ns, string func, Closure reference);|Unregister Broadcast Function.|5=}}
| + | |
− | | + | |
− | {{ScriptFunction|int|UnregisterBroadcastFunction|(string ns, string func);|Unregister Broadcast Function.|5=}}
| + | |
− | | + | |
− | {{ScriptFunction|void|SetSuperGlobal|(string ns, string key, DynValue value);|Sets a Super global key to a value. The value can be any object type.|5=
| + | |
− | Space.Shared.SetSuperGlobal("com.someNameHere.world", "version", "1.02"); |6=
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |