AddResourceConfig: Difference between revisions
Jump to navigation
Jump to search
(New page: {{Server function}} __NOTOC__ tba ==Syntax== <syntaxhighlight lang="lua"> xmlnode addResourceConfig ( resource, name, type = "server" ) </syntaxhighlight> ===Required Arguments=== <!-- List each argument one p...) |
(Added description, fixed syntax, added argument descriptions, added return info, added categories) |
||
Line 1: | Line 1: | ||
{{Server function}} | {{Server function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function adds a new empty config file to an existing resource. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
xmlnode addResourceConfig ( resource, | xmlnode addResourceConfig ( resource theResource, string filename, [ string filetype = "server" ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theResource:''' the [[resource]] to which the config file will be added. | |||
*''' | *'''filename:''' the name of the config file to be added. | ||
===Optional Arguments=== | ===Optional Arguments=== | ||
{{OptionalArg}} | {{OptionalArg}} | ||
*''' | *'''filetype:''' a string indicating whether the file is serverside ("server") or clientside ("client"). | ||
===Returns=== | ===Returns=== | ||
Returns the new config's root [[xmlnode]] if the config was added successfully, ''false'' otherwise. | |||
==Example== | ==Example== | ||
[[Category:Needs Example]] | |||
==See Also== | ==See Also== | ||
{{Resource_functions}} | {{Resource_functions}} | ||
[[Category:Incomplete]] |
Revision as of 10:37, 20 October 2007
This function adds a new empty config file to an existing resource.
Syntax
xmlnode addResourceConfig ( resource theResource, string filename, [ string filetype = "server" ] )
Required Arguments
- theResource: the resource to which the config file will be added.
- filename: the name of the config file to be added.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- filetype: a string indicating whether the file is serverside ("server") or clientside ("client").
Returns
Returns the new config's root xmlnode if the config was added successfully, false otherwise.