VoidExpanse/scope-config: Difference between revisions

From AtomicTorchWiki
No edit summary
No edit summary
Line 1: Line 1:
= Config scope =
Used to get access to server variables from config file.
'''Visibility:''' Globall.
== List of functions ==
{{Scripting_api|GetFlag|
{{Scripting_api|GetFlag|
* String: name|
* String: name|
Line 5: Line 12:
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|

Revision as of 08:04, 12 February 2014

Config scope

Used to get access to server variables from config file.

Visibility: Globall.

List of functions

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.


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.