• Broken drop system
    2 replies, posted
So basically, thanks to Acecool on this one, I've had this working chatcommands code, and I setup a money drop chatcommand feature, which worked the whole day. This is the error I get. [CODE][ERROR] gamemodes/example/entities/entities/money_smallgold/init.lua:27: attempt to compare number with string 1. unknown - gamemodes/example/entities/entities/money_smallgold/init.lua:27 2. unknown - lua/includes/modules/concommand.lua:69[/CODE] If you wish to look at all the code, here's the pastebin: [url]http://pastebin.com/kYG5Jrx6[/url]
[CODE] function Player:AddMoney(num) self:SetMoney(tonumber(self:GetMoney())+tonumber(num)) end function Player:RemoveMoney(num) self:SetMoney(tonumber(self:GetMoney())-tonumber(num)) end [/CODE]
It seems to work even though I'm not sure it came from your fix. My gamemode seems to break and restart working every now and then, and I have no clue why. Anyway, thanks.
Sorry, you need to Log In to post a reply to this thread.