Trevit Posted June 2, 2011 Posted June 2, 2011 Hi, I have a little scripting problem: I have the following line in my map file: Now i want to read the line ( from an other resource ) in the script. Spawnpoints = {} Spawnpoints = -- read all spawnpoints How can i manage it?
karlis Posted June 2, 2011 Posted June 2, 2011 function getNodes(mapfile,name) local xml=xmlLoadFile(mapfile) local tbl={} if xml then local child=xmlNodeGetChildren(xml) for k,v in ipairs(child) do if xmlNodeGetName(v)==name then tbl[#tbl+1]=xmlNodeGetAttributes(v) end end return tbl end end
karlis Posted June 2, 2011 Posted June 2, 2011 strange, it should return table containing tables of all info about particular child...
eAi Posted June 4, 2011 Posted June 4, 2011 You should just use the map like normal, the use getElementsByType and getElementData...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now