Tekken Posted November 30, 2014 Posted November 30, 2014 (edited) Hi, i created this for saving players money in money.xml, and i get this error Bad argument @'xmlNodeSetAttribute' string at [argument 3, got boolean] my code function saveMoney(thePlayer) if fileExists("money.xml") then fileDelete('money.xml') end local moneyFile = xmlCreateFile("money.xml", "money") if not moneyFile then outputChatBox(thePlayer, "Bani nu au putut fi incarcati!",255, 0, 0) return end local count = 0 local players = getElementsByType ("player") for i,v in ipairs(players) do local money = xmlCreateChild (moneyFile, "money") local pname = getPlayerUserName(v) local psuma = getPlayerMoney(v) xmlNodeSetAttribute(money, "usern", pname) xmlNodeSetAttribute(money, "suma", psuma) end xmlSaveFile (moneyFile) xmlUnloadFile (moneyFile) end setTimer(saveMoney, 500, 0) Edited November 30, 2014 by Guest Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Tekken Posted November 30, 2014 Author Posted November 30, 2014 if i use getPlayerName insted of getPlayerUserName it works but is delete all money on player joyn the game! Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Tekken Posted November 30, 2014 Author Posted November 30, 2014 Done ! Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
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