Get: Difference between revisions
Jump to navigation
Jump to search
(New page: <div style="border: 12px dotted #901010;padding:8px;margin:10px;"> This function needs to be documented. Please see Settings Proposal.</div>) |
No edit summary |
||
Line 1: | Line 1: | ||
< | {{Server function}} | ||
__NOTOC__ | |||
This function gets a setting's value, or a group of settings' values, from the [[settings system|settings registry]]. | |||
==Syntax== | |||
<syntaxhighlight lang="lua"> | |||
var get ( string settingName ) | |||
</syntaxhighlight> | |||
==Optional Arguments== | |||
'''settingName:''' The name of the setting you want to set. See [[settings system#Setting names|setting names]] for information on settings names. | |||
===Returns=== | |||
Returns the value of the setting if a single setting was specified and found, or a ''table'' (in associative-array form) containing: | |||
*the list of global setting name/value pairs if "." is passed as a setting name, | |||
*the list of resource settings if a resource name followed by a "." is passed, | |||
*the list of the script's resource settings if an empty string is passed. | |||
It returns ''false'' if the specified setting doesn't exist. | |||
==Example== | |||
No example yet. | |||
==See Also== | |||
{{Settings registry functions}} | |||
[[Category:Needs Example]] |
Revision as of 00:32, 19 September 2007
This function gets a setting's value, or a group of settings' values, from the settings registry.
Syntax
var get ( string settingName )
Optional Arguments
settingName: The name of the setting you want to set. See setting names for information on settings names.
Returns
Returns the value of the setting if a single setting was specified and found, or a table (in associative-array form) containing:
- the list of global setting name/value pairs if "." is passed as a setting name,
- the list of resource settings if a resource name followed by a "." is passed,
- the list of the script's resource settings if an empty string is passed.
It returns false if the specified setting doesn't exist.
Example
No example yet.