saveMapData
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This converts a set of elements in the element tree into XML. This is a format that can then be loaded as a map file. Each element represents a single XML node.
Syntax
bool saveMapData ( xmlnode node, element baseElement, [ bool childrenOnly = false ] )Required Arguments
- node: An existing node that should contain the contents of baseElement
- baseElement: The first element to output to the XML tree. This element and all its children (and their children, etc) will be output.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- childrenOnly (default: false): Defines if you want to only save children of the specified element.
Returns
- bool: value
Saving your resource's data to an map file (untested)
Code Examples
shared
Saving your resource's data to anmap file(untested)
local mapFile = xmlCreateFile("saved.map", "map")
if mapFile then saveMapData(mapFile, resourceRoot) xmlSaveFile(mapFile) xmlUnloadFile(mapFile)end