GTX Posted October 21, 2011 Share Posted October 21, 2011 Hello, I was about to make the stats system (based on race) and I had some problems... addEvent("onPlayerDDDMWin",true) function DDDMWin(winner) if getPlayerCount() < count then --nothing else if not isGuestAccount( getPlayerAccount ( winner ) ) then local PlayerName = getPlayerName( winner ) local getPlayerAcc = getPlayerAccount ( winner ) outputChatBox("#FFFFFF>> " .. PlayerName .. " #ff9000won as last player alive!", getRootElement(), 255, 255, 255, true) givePlayerMoney( winner , 500) setElementData(winner, "wins", getElementData(winner,"wins") + 1) outputChatBox("#FFFFFF>> #ff9000Earned #FFFFFF200 #ff9000points (Total: #FFFFFF" .. getElementData(winner,"Points") .. "#ff9000) and #FFFFFF1000 #ff9000cash (Total: #FFFFFF" .. getPlayerMoney(winner) .. "$#ff9000)", getRootElement(), 255, 255, 255, true) else outputChatBox("#FFFFFF>> " .. getPlayerName( winner ) .. " #ff9000won as last player alive! (Guest)", getRootElement(), 255, 255, 255, true) end end end addEventHandler("onPlayerDDDMWin",getRootElement(),DDDMWin) Don't worry about the rest of code. Thanks in advance Link to comment
Castillo Posted October 21, 2011 Share Posted October 21, 2011 Could you at least tell us what "problems" did you get? does it output errors to debugscript? Link to comment
GTX Posted October 21, 2011 Author Share Posted October 21, 2011 Oh, I fixed the problem. So, moderator can lock this topic EDIT: The debug says: attempt to perform arithmetic on a boolean value 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