GetResourceConfig: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
<!-- Describe in plain english what this function does. Don't go into details, just give an overview -->
<!-- Describe in plain english what this function does. Don't go into details, just give an overview -->
This fake function is for use with blah & blah and does blahblahblabhalbhl
This function is used to return the root node of a configuration file. (defined in meta.xml)


==Syntax==  
==Syntax==  
Line 11: Line 11:
===Required Arguments===  
===Required Arguments===  
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type -->
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type -->
*'''argumentName:''' description
*'''theResource:''' The resource from which the function calls the configuration file
 
*'''filename:''' The exact file name of the configuration file. (e.g. "file.xml" )
<!-- Only include this section below if there are optional arguments -->
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' description
*'''argumentName3:''' description


===Returns===
===Returns===
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check -->
<!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check -->
Returns ''true'' if blah, ''false'' otherwise. <br \>
Returns the root node of the specified configuration file. If the file is corrupted, not defined in meta.xml or doesn't exist, returns false.
false on fail <br \>
returns a resource config


==Example==  
==Example==  
<!-- Explain what the example is in a single sentance -->
This example does...
<!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized -->
<syntaxhighlight lang="lua">
--This line does...
blabhalbalhb --abababa
--This line does this...
mooo
</syntaxhighlight>


==See Also==
==See Also==
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc -->
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc -->
{{FunctionArea_functions}}
{{FunctionArea_functions}}
[[Category:Incomplete]] -- leave this unless you complete the function
[[Category:Incomplete]]

Revision as of 09:07, 14 June 2007

This function is used to return the root node of a configuration file. (defined in meta.xml)

Syntax

xmlnode getResourceConfig ( resource theResource, string filename )

Required Arguments

  • theResource: The resource from which the function calls the configuration file
  • filename: The exact file name of the configuration file. (e.g. "file.xml" )

Returns

Returns the root node of the specified configuration file. If the file is corrupted, not defined in meta.xml or doesn't exist, returns false.

Example

See Also

Template:FunctionArea functions