Hypnos Posted August 29, 2014 Share Posted August 29, 2014 I do send Money panel. Edit Box'a Write an article other than the number one mistake is throwing the error. Link to comment
Hypnos Posted August 29, 2014 Author Share Posted August 29, 2014 i use tonumber.Panel is working but I do not want to error. Error ; (Server-Side) addEvent("paraGonder",true) addEventHandler("paraGonder", getRootElement(), function(player,sentMoney) local name = getPlayerName(source) local name1 = getPlayerName(player) local getmoney = tonumber(getPlayerMoney(source)) if tonumber(sentMoney) <= getmoney and tonumber(sentMoney) >= 0 and tonumber(sentMoney) ~= 0 then local give = givePlayerMoney (player,tonumber(sentMoney)) local take = takePlayerMoney (source,tonumber(sentMoney)) if give and take then outputChatBox("#0dff00Para Gönderdin. #ffff00"..name1.." #ff8400[Miktar: $"..sentMoney.."]",source,0,255,255,true) outputChatBox("#ffff00"..name.."'#0dff00dan Para Geldi. #ff8400[Miktar: $"..sentMoney.."]",player,0,255,255,true) end elseif getmoney <= tonumber(sentMoney) or 0 >= tonumber(sentMoney) then outputChatBox("Yeterli Paran Yok",source,255,0,0,true) elseif not tonumber(sentMoney) == 0 then outputChatBox("HATA: Para",source,255,0,0,true) end end ) How can I solve this error? Waiting For Help Link to comment
Bonsai Posted August 29, 2014 Share Posted August 29, 2014 Well, if you use tonumber, you also have to check if it returns nil. That makes sure only numbers get through. 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