kevin11 Posted May 31, 2010 Share Posted May 31, 2010 (edited) setElementData(getElementData,"Race Loses",tonumber(getElementData(winner,"Race Loses"))+1) what is wrong with this line it doesnt give a error but it also doesnt work:S Edited May 31, 2010 by Guest Link to comment
The_Ex Posted May 31, 2010 Share Posted May 31, 2010 onPlayerWasted doesn't sound like a player element. Change onPlayerWasted with winner as you use it for getElementData. Link to comment
Dark Dragon Posted May 31, 2010 Share Posted May 31, 2010 setElementData(winner,"Race Loses",tonumber(getElementData(winner,"Race Loses"))+1) might this be the problem? Link to comment
kevin11 Posted May 31, 2010 Author Share Posted May 31, 2010 setElementData(winner,"Race Loses",tonumber(getElementData(winner,"Race Loses"))+1) might this be the problem? doesnt it now add 1 lose to to winner? Link to comment
The_Ex Posted May 31, 2010 Share Posted May 31, 2010 Well, actually you haven't explained your code. We're not here to make guesses BUT my last guess is... As you mistyped onPlayerWasted in your code which you edited later then the thing you want might be: addEventHandler("onPlayerWasted",getRootElement(), function() setElementData(source,"Race Loses",getElementData(source,"Race Loses")+1) end ) Anyways, you need to explain the problem and give us more code to help you. Link to comment
kevin11 Posted June 1, 2010 Author Share Posted June 1, 2010 hmm i think i get it now ty its working perfect 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