Jump to content

fileOpen..


pNine

Recommended Posts

Posted

Hi guys i've been working in something and basically what im trying to do is make a new 'tranfer box' aka 'download box',

therefore i have to make my own download manager.

But i'm having some troubles with this, first i tried loading the map with the xmlLoadFile function but that also triggers the

download box, so i moved on to fileOpen.

  
  
local mapElement = createElement ( "map" ) 
  
local mapMeta = xmlLoadFile ( ":"..getResourceName(map).."/meta.xml" ) -- getting the map's meta in order to get its src 
local mapChild = xmlFindChild ( mapMeta, "map", 0 ) 
local mapSrc = xmlNodeGetAttribute ( mapChild, "src" ) 
local mapFile = fileOpen( ":"..getResourceName(map).."/"..mapSrc ) 
  
local newMapElement = loadMapData ( mapFile, mapElement ) --  
  

here's where im stuck at.. the first parameter must be a node and all i've got is a file.

any feedback will be apreciated :]

Posted

All what xmlLoadFile does is loading the data from the file into memory. It doesn't do anything related to the data transfer.

-

Posted

You are right! What triggers the transfer box is the loadMapData. Is there any other function to do such thing, instead of getting all the nodes and its childs ?

Posted

I don't think there is, you'll most likely need to script a function to do it.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...