Okay so I am making a platform game and I have the ground move instead of the player when he gets within a certain didtance from the edge. But when I try to make the ground move according to some variable in my world class I get this error:
All I know is that there is something wrong with line 14 of the Ground.class. Not certain exactly what a null pointer exception is but it is refering to a line of code telling it to set one of its variables to one of the worlds.
I get the error when I press act.
java.lang.NullPointerException at Ground.act(Ground.java:14) at greenfoot.core.Simulation.actActor(Simulation.java:565) at greenfoot.core.Simulation.runOneLoop(Simulation.java:523) at greenfoot.core.Simulation.runContent(Simulation.java:213) at greenfoot.core.Simulation.run(Simulation.java:203)