AddResourceMap: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Fixed syntax, added argument descriptions, return info, added categories)
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
xmlnode addResourceMap ( resource theResource, string name, [ dimension = 0 ] )
xmlnode addResourceMap ( resource theResource, string filename, [ int dimension = 0 ] )
</syntaxhighlight>  
</syntaxhighlight>  


===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 -->
*'''theResource:''' the [[resource]] to which the map file will be added.
*'''argumentName:''' description
*'''filename:''' the name of the map file to be added.


<!-- Only include this section below if there are optional arguments -->
===Optional Arguments===  
===Optional Arguments===  
{{OptionalArg}}  
{{OptionalArg}}  
*'''argumentName2:''' description
*'''dimension:''' the [[dimension]] in which the map's objects will be placed.
*'''argumentName3:''' description


===Returns===
===Returns===
Returns a table of resources.
Returns the new map's root [[xmlnode]] if the map was added successfully, ''false'' otherwise.


==Example==
==Example==
This function lists all loaded resources in the console.
[[Category:Needs Example]]
<syntaxhighlight lang="lua">
function blabla ()
    --this does blabla
end
</syntaxhighlight>


==See Also==
==See Also==
{{Resource_functions}}
{{Resource_functions}}
[[Category:Incomplete]]

Revision as of 10:34, 20 October 2007

This function adds a new empty mapfile to an existing resource.

Syntax

xmlnode addResourceMap ( resource theResource, string filename, [ int dimension = 0 ] )

Required Arguments

  • theResource: the resource to which the map file will be added.
  • filename: the name of the map 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.

  • dimension: the dimension in which the map's objects will be placed.

Returns

Returns the new map's root xmlnode if the map was added successfully, false otherwise.

Example

See Also