loadMapData
Client-side
Server-side
Shared
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function is intended to load data from a loaded XML file into the element tree. This could be used for loading an external map, or part of another map.
Syntax
loadMapData ( )Code Examples
server
Example 1:This example is a function that you could use to load an arbitarymap fileinto theelement tree.
function loadMapFile(fileName) local xmlNode = getResourceConfig(fileName)
if (xmlNode) then -- check if the file was loaded ok loadMapData(xmlNode, root) -- load the loaded xml file into the element tree xmlUnloadFile(xmlNode) -- Unload the xml file endend