GetResourceConfig: Difference between revisions
Jump to navigation
Jump to search
Black Dragon (talk | contribs) No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function is used to return the root node of a configuration file. Config files must be predefined in a resource's [[meta file]]. | |||
This function is used to return the root node of a configuration file. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
xmlnode getResourceConfig ( resource theResource, string filename ) | xmlnode getResourceConfig ( [resource theResource = getThisResource()], string filename ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''filename:''' The exact file name of the configuration file. (e.g. "file.xml" ) | |||
===Optional Arguments=== | |||
*'''theResource:''' The resource from which the function calls the configuration file | *'''theResource:''' The resource from which the function calls the configuration file | ||
===Returns=== | ===Returns=== | ||
Returns the root node of the specified configuration file. If the file is corrupted, not defined in the meta file or doesn't exist, returns false. | |||
Returns the root node of the specified configuration file. If the file is corrupted, not defined in meta | |||
==Example== | ==Example== | ||
==See Also== | ==See Also== | ||
{{Resource_functions}} | |||
{{ | |||
[[Category:Incomplete]] | [[Category:Incomplete]] |
Revision as of 00:51, 15 June 2007
This function is used to return the root node of a configuration file. Config files must be predefined in a resource's meta file.
Syntax
xmlnode getResourceConfig ( [resource theResource = getThisResource()], string filename )
Required Arguments
- filename: The exact file name of the configuration file. (e.g. "file.xml" )
Optional Arguments
- theResource: The resource from which the function calls the configuration file
Returns
Returns the root node of the specified configuration file. If the file is corrupted, not defined in the meta file or doesn't exist, returns false.