increment integer in class

Android

Active member
Joined
Mar 6, 2007
Messages
35
Programming Experience
1-3
I have an integer variable inside a class that is initially set to 0.
Whenever I try to increment this from outside the class nothing happens, it is still set to 0. I have tried to do this with both a public variable and a private variable with a public property but non seem to work.
I have put breakpoints on the property where it is set and it is not called when it shouldnt be so i cant think of reason why this should happen.

Can anyone help me?

Thanks
 
Thanks but I fixed it now, I made a new project with just the relevant code to post it and that didn't have the problem.
The variable was the score in the game but after the player had score it reinitialized the game class to reset the game and this meant that the score got reset as soon as someone had scored.
I feel quite stupid now for not noticing that:eek:
 
Back
Top