VoidExpanse/scope-config: Difference between revisions
Atomic-admin (talk | contribs) No edit summary |
|||
| Line 21: | Line 21: | ||
<pre style="margin:0px">var a = config.GetSetting("some_var");</pre>| | <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. Standard return types are string, int, float, boolean. | Returns a server variable value by name. Basically used to read server config options from script. Standard return types are string, int, float, boolean. | ||
}} | }} | ||
Revision as of 09:57, 18 February 2014
Config scope
Used to get access to server variables from config file.
Visibility: Global.
List of functions
| GetFlag | ||
|---|---|---|
| Arguments | Returns | Example |
|
bool - 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. | ||
| GetSetting | ||
|---|---|---|
| Arguments | Returns | Example |
|
object - 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. Standard return types are string, int, float, boolean. | ||