VoidExpanse/scope-config: Difference between revisions

From AtomicTorchWiki
No edit summary
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Scripting_api|GetFlag|
<noinclude>
* String: name|
[[Category:VoidExpanse/api_scopes]]
Boolean - whether the flag is set or not.|
</noinclude>
<nowiki>var a = config.GetFlag("some_var");</nowiki> |
= Config scope =
Returns a boolean server flag value by name. Basically used to read server config options.
Used to get access to server variables from config file.
}}


var a = config.GetFlag("some_var");
'''Visibility:''' Global.


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

Latest revision as of 03:58, 5 July 2014


Config scope

Used to get access to server variables from config file.

Visibility: Global.

List of functions

GetSetting
Arguments Returns Example
  • string: name

string- a particular value of config.

var a = config.GetSetting("some_var");
Description

Returns a server variable value by name. Basically used to read server config options from script.