fargot.. Posted June 15, 2019 Share Posted June 15, 2019 السلام عليكم و رحمة الله وبركاته اعطني حل لدي مشكلة == mod//:client:attempt to compare number with boolean Link to comment
fargot.. Posted June 15, 2019 Author Share Posted June 15, 2019 35 minutes ago, #BrosS said: إطرح الكود .. اعطيني حل مشكلة حق دي Banks-System/server.Lua:118: attempt to perform arithmetic on a boolean value -line=112- addEvent("AddMoneyToBank",true) -line=113 addEventHandler("AddMoneyToBank",root, -line=114 function (player,money) -line=115 local sourceAccount = getPlayerAccount ( player ) -line=116 local AccountName = getAccountName(sourceAccount) -line=117 --local new = getAccountSavedMoney ( AccountName )+money -line=118 local new = getElementData(player,"Bank")+money -line=119 --takePlayerMoney(player,money) -line=120 setElementData(player,"Money",(getElementData(player,"Money") or 0 ) - money) -line=121 setElementData(player,"Bank",(getElementData(player,"Bank") or 0 ) + money) -line=123 --setAccountSavedMoney ( AccountName, new ) -line=124 --setElementData(player,"Bank", new) -line=115 triggerClientEvent ( "onOpenBankWindow", player, player, new ) end ) Link to comment
SycroX Posted June 15, 2019 Share Posted June 15, 2019 local new = (getElementData(player, "Bank") or 0) + tonumber(money) بدل سطر118 بذا 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