Jump to content

xml


xXMADEXx

Recommended Posts

The correct syntax for "xmlLoadFile" is

xmlnode xmlLoadFile ( string filePath )

I think what you're trying to do is this:

  
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function () 
    local file = xmlLoadFile ("warps.xml") 
    local node = xmlFindChild(file,"warps",0) 
    local houseroot = xmlFindChild (node,"warp",0) 
    for k,v in ipairs (xmlNodeGetChildren(houseroot))do 
        local x = xmlNodeGetAttribute ( v, "Name" ) 
        outputChatBox ( x ) 
    end 
end ) 
  

Link to comment

U shouldnt ask questions on here till you are at least pulling your hair out or are just clueless how things work. Play around with em first. The best way to learn is when you find the mistakes your self with the exceptions like I just said

Link to comment
U shouldnt ask questions on here till you are at least pulling your hair out or are just clueless how things work. Play around with em first. The best way to learn is when you find the mistakes your self with the exceptions like I just said

It took me a good two hours (ikr, im a really noob at XML...) Finally, I realized that I could just use the code from GateMaker.

Link to comment

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...