Search the Community
Showing results for tags 'fail'.
-
First of all, sorry for bad English. I am creating a script and I used the getElementData function to get data stored in the user account and then the setElementData function to get the information through the getElementData on the client but the script has the following error in debugging: Bad argument @ setElementData [Expect element at argument 1, got nil] SCRIPT: [SERVER-SIDE] function setarDados_Entrar(source) local acc = getPlayerAccount(source) local habl = getAccountData(acc, "hablt") local ficha = getAccountData(acc, "fichacriminal") setElementData(source, "hblt", habl)--In that error line setElementData(source, "fich", ficha) -- In that error line end function setarDados_Iniciar() local acc = getPlayerAccount(player) local habl = getAccountData(acc, "hablt") local ficha = getAccountData(acc, "fichacriminal") setElementData(player, "hblt", habl)--In that error line setElementData(player, "fich", ficha)--In that error line end function setarDados_Mudar(player) local acc = getPlayerAccount(player) local habl = getAccountData(acc, "hablt") local ficha = getAccountData(acc, "fichacriminal") setElementData(player, "hblt", habl)--In that error line setElementData(player, "fich", ficha)--In that error line end addEventHandler("onPlayerLogin", getRootElement(), setarDados_Entrar) addEventHandler("onResourceStart", root, setarDados_Iniciar) addEventHandler("onAccountDataChange", root, setarDados_Mudar)
- 1 reply
-
- help
- setelementdata
-
(and 3 more)
Tagged with:
-
Hey , this is my code , He don't create the XML file and i tried this : ( Only Client ) function createXML() if source == vehPanel.button[1] then settings = xmlCreateFile("savedsettings.xml","settings") if guiCheckBoxGetSelected(vehPanel.checkbox[1]) then xmlNodeSetAttribute(settings, "car", "true") else xmlNodeSetAttribute(settings, "car", "false") end end addEventHandler("onClientGUIClick", getRootElement(), createXML) And this : function createXML() settings = xmlCreateFile("savedsettings.xml","settings") if guiCheckBoxGetSelected(vehPanel.checkbox[1]) then xmlNodeSetAttribute(settings, "car", "true") else xmlNodeSetAttribute(settings, "car", "false") end end addEventHandler("onClientResourceStart", getRootElement(), createXML) And this : function createXML() local exists = fileExists ( "savedsettings.xml" ) if not exists then settings = xmlCreateFile("savedsettings.xml","settings") if guiCheckBoxGetSelected(vehPanel.checkbox[1]) then xmlNodeSetAttribute(settings, "car", "true") else xmlNodeSetAttribute(settings, "car", "false") end end addEventHandler("onClientResourceStart", getRootElement(), createXML) And no one create xml , i need some help please , this is the end code : function load() local currentFile = xmlLoadFile ("savedsettings.xml") if xmlNodeGetAttribute(currentFile, "car") == "true" then guiCheckBoxSetSelected(vehPanel.checkbox[1], true) veh1() end end load()
-
From 22:30 am wanting to access my account, but will not let me ... As reason tells me and try to enter more than 10 times misspelling password, but I do not play for 2 days or so ago, a 30h aproximadamente..Cuestion not let me change against disconnects me to want to change it and tells me try after 24 hours, but it seems wrong to have to wait and not to get to play for two days, and I can not queiro play. ..osea, any solution?