Jump to content

xml problem


Recommended Posts

Posted

i just started having fun with xml, and faced one problem:

my resource name "xmlsave"

local main = xmlCreateFile(":xmlsave/vvv.xml", "xml")
local cp = xmlCreateChild(main, "checkpoint")
outputChatBox(tostring(xmlNodeSetAttribute(cp, "pp", "xx")))
outputChatBox(tostring(xmlSaveFile(main)))
outputChatBox(tostring(xmlUnloadFile(main)))

everything is true, no errors in debugscript, no file in resource folder.

Posted

Try to use two backslashes in the filepath instead of the single slash, like:

xmlCreateFile(":xmlsave\\vvv.xml", "xml")

I'm not joking. If it doesn't help, try to specify a path via only a filename without a name of the resource.

Posted

Do you run it clientside? Just quickly checked through the server console, returned 3 "true" and a file.

UPD Nice for clientside as well, both with full path and relative one. Weird, your code is fine. Try to make new resource from scratch and avoid using "xml" into it's filename. Sounds weird, I know, but who knows. I clearly remember I couldn't give a "hud" name to the node. Everything else was working, but "hud" wasn't. You may be the chosen one :wink:

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