I'm trying to create a game but it keeps crashing once it comes to the point of where counter.add(1); is used.
I need to find another way of adding a point to the counter but I don't know any other ways than counter.add(1);
Perhaps you should try to figure out why counter.add(1); is crashing, rather than just looking for another method. If you post your code, and the exact error you get, people here may be able to help you do that.