TorNix~|nR Posted December 18, 2017 Share Posted December 18, 2017 Hello guys, I have this code, I don't know why it's not working correctly when I have 2999 zombie kills, I can't join the clan, and when I have 3001 zombie kils, I can't join the clan too help please? local account = getPlayerAccount(source) if getAccountData(account, "Zombie kills") < 3000 then ------------- outputChatBox("fail", source) return end Link to comment
koragg Posted December 18, 2017 Share Posted December 18, 2017 Should work. Try this: if tonumber(getAccountData(account, "Zombie kills")) < 3000 then 1 Link to comment
TorNix~|nR Posted December 18, 2017 Author Share Posted December 18, 2017 Thank you, but it's the same Link to comment
koragg Posted December 18, 2017 Share Posted December 18, 2017 (edited) Try to output in chat the content of the account data. Maybe it's not a number? Do this in a separate function: function testStuff (player) local acc = getPlayerAccount (player) if acc and isGuestAccount (acc) then return end local data = getAccountData (acc, "Zombie kills") if data then outputChatBox (data, player, 255, 0, 0) end addCommandHandler ("testdata", testStuff) Just type "testdata" in chat and tell me what comes up. Server side script btw. Edited December 18, 2017 by koragg 1 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