Ahmed Araby Posted May 8, 2017 Posted May 8, 2017 function Create() local hFile = fileOpen("map1.map") buffer = fileRead(hFile, 100000000) local newFile = fileCreate("map2.map") if (newFile) then fileWrite(newFile, buffer) fileClose(newFile) fileClose(hFile) addResourceMap(":File/map2.map",0) end end addCommandHandler("Create",Create) i have a problem that i have a map in resource that name is " File2 " i want to get text to it and make also map file and put text in at and add this map file to another resource that name is " File " every thing did but the meta file write : <map src="" dimension="0"></map> the meta don't add the map file name ..
undefined Posted May 8, 2017 Posted May 8, 2017 (edited) local xml = addResourceMap(":File/map2.map", 0) local map = xmlFindChild(xml, "map", 0) xmlNodeSetAttribute(map, "src", "map2.map") You can do it manual. Edited May 8, 2017 by ZoRRoM
Ahmed Araby Posted May 8, 2017 Author Posted May 8, 2017 27 minutes ago, ZoRRoM said: local xml = addResourceMap(":File/map2.map", 0) local map = xmlFindChild(xml, "map", 0) xmlNodeSetAttribute(map, "src", "map2.map") You can do it manual. not worked
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