- Documentation
- Server functions
- saveMapData
Function
saveMapData
Saves the elements under a given element to an XML node in .map format.
Syntax
bool saveMapData(xmlnode node, element baseElement [, bool childrenOnly = false])Arguments
nodexmlnode- The XML node.
baseElementelement- The element whose children to save.
childrenOnlybool, optional = false- Children only, without the element itself.
Returns
true on success.
Example
local xml = xmlCreateFile("maps/zapis.map", "map")
saveMapData(xml, resourceRoot, true)
xmlSaveFile(xml)
xmlUnloadFile(xml)