I have a pong game I am partway through creating (hence some areas that I still need to do), however I just added in a score, and when the ball reaches either end of the screen, instead of increasing one of the players scores and resetting the ball to the centre point, it crashes.
Here's the link for the project: http://www.greenfoot.org/scenarios/3551
Open it in greenfoot, hit run and see. When the ball reaches either end of the world it stops running and the Greenfoot Terminal Window pops up with error code. I understand that the reason for this is to do with me trying to increase the counter... at least I think so, but I don't know how to get around this.
Also to explain:
^ I changed the value to public (from private) in an attempted fix.
public class Counter extends Actor { public int value = 0; private int target = 0; private String text; private int stringLength;