ertlflorian1 Posted February 13, 2013 Share Posted February 13, 2013 Hi i have an problem there will be always showerror triggered, when the xml exists and when not please help me I will wen the xml exists then the first part will happen else show error must be triggered addEventHandler ("onClientGUIClick", getRootElement(), function (state) if state == "left" then if source == but1 then gme = getLocalPlayer() pname = getPlayerName (gme) if (fileExists ("koordinaten.xml") )then local rootnode = xmlLoadFile("koordinaten.xml") local children = xmlNodeGetChildren(rootnode) for index, node in ipairs(children) do local xx = tonumber(xmlNodeGetAttribute(node, "x")) local yy = tonumber(xmlNodeGetAttribute(node, "y")) local zz = tonumber(xmlNodeGetAttribute(node, "z")) guiSetText (text, xx..", "..yy..", "..zz..", ") end else triggerServerEvent ("showerror", getRootElement(), pname) end end end end) Sorry for my very bad english Link to comment
iPrestege Posted February 13, 2013 Share Posted February 13, 2013 addEventHandler ("onClientGUIClick", getRootElement(), function (state) if state == "left" then if source == but1 then gme = getLocalPlayer() pname = getPlayerName (gme) if (fileExists ("koordinaten.xml") )then local rootnode = xmlLoadFile("koordinaten.xml") local children = xmlNodeGetChildren(rootnode) for index, node in ipairs(children) do local xx = tonumber(xmlNodeGetAttribute(node, "x")) local yy = tonumber(xmlNodeGetAttribute(node, "y")) local zz = tonumber(xmlNodeGetAttribute(node, "z")) guiSetText (text, xx..", "..yy..", "..zz..", ") end else triggerServerEvent ("showerror", localPlayer, pname) end end end end) Link to comment
ertlflorian1 Posted February 13, 2013 Author Share Posted February 13, 2013 dont work same problem Link to comment
iPrestege Posted February 13, 2013 Share Posted February 13, 2013 Can you tell me what debugscript say ? Link to comment
csiguusz Posted February 13, 2013 Share Posted February 13, 2013 Is your file correctly added to the meta.xml? Link to comment
iPrestege Posted February 13, 2013 Share Posted February 13, 2013 Is your file correctly added to the meta.xml? Yes, he should add it! Link to comment
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