XML error. - attempt to index global 'system'

Hi all,

I´m new in Lua. I´m testing the xml files, but find this error when I run the code

Program:

xml =require(“xml”).newParser()

local inbox = xml.loadFile(“sample.xml”,system.ResourceDirectory)

Error:

Program ‘lua’ started in ‘/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms’ (pid: 2804).

/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua: /Users/XX/Desktop/Programas/XML/main.lua:3: attempt to index global ‘system’ (a nil value)

stack traceback :

/Users/XX/Desktop/Programas/XML/main.lua:3: in main chunk

[C]: at 0x00001c80

Regards

The common cause of something like this is if you have overwritten the system object with another global variable named system.

I don’t see that in the code you’ve posted, but I also don’t know where you got the XML parser.   It could be the culprit.

Rob

Thanks Rob, I´m goint to continue searching.

The common cause of something like this is if you have overwritten the system object with another global variable named system.

I don’t see that in the code you’ve posted, but I also don’t know where you got the XML parser.   It could be the culprit.

Rob

Thanks Rob, I´m goint to continue searching.