VoidExpanse/scope-config: Difference between revisions

From AtomicTorchWiki
No edit summary
No edit summary
Line 2: Line 2:
* String: name|
* String: name|
Boolean - whether the flag is set or not.|
Boolean - whether the flag is set or not.|
var a = config.GetFlag("some_var");|
<code><nowiki>var a = config.GetFlag("some_var");</nowiki></code> |
Returns a boolean server flag value by name. Basically used to read server config options.
Returns a boolean server flag value by name. Basically used to read server config options.
}}
}}
var a = config.GetFlag("some_var");


{{Scripting_api|GetValue|
{{Scripting_api|GetValue|
* String: name|
* String: name|
Mixed - a particular value of config.|
Mixed - a particular value of config.|
var a = config.GetValue("some_var");|
<code><nowiki>var a = config.GetValue("some_var");</nowiki></code>|
Returns a server variable value by name. Basically used to read server config options. Standard return types are string, integer, float, etc.
Returns a server variable value by name. Basically used to read server config options. Standard return types are string, integer, float, etc.
}}
}}

Revision as of 07:44, 12 February 2014

GetFlag
Arguments Returns Example
  • String: name

Boolean - whether the flag is set or not.

var a = config.GetFlag("some_var");

Description

Returns a boolean server flag value by name. Basically used to read server config options.

var a = config.GetFlag("some_var");


GetValue
Arguments Returns Example
  • String: name

Mixed - a particular value of config.

var a = config.GetValue("some_var");

Description

Returns a server variable value by name. Basically used to read server config options. Standard return types are string, integer, float, etc.