This site requires JavaScript, please enable it in your browser!
Greenfoot back
sharifahhilwa
sharifahhilwa wrote ...

2014/8/18

Terminal window

sharifahhilwa sharifahhilwa

2014/8/18

#
java.lang.NullPointerException at RoadWorld.endLevel(RoadWorld.java:197) at RunningMan.endGame(RunningMan.java:98) at RunningMan.act(RunningMan.java:31) at greenfoot.core.Simulation.actActor(Simulation.java:568) at greenfoot.core.Simulation.runOneLoop(Simulation.java:526) at greenfoot.core.Simulation.runContent(Simulation.java:215) at greenfoot.core.Simulation.run(Simulation.java:205) PLEASE HELP ME!! IM NEW AND I DO NOT KNOW WHY THIS TERMINAL KEEPS APPEARING EVERYTIME I TRY TO RUN MY GAME
davmac davmac

2014/8/18

#
A NullPointerException occurs when you try to dereference (i.e. call a method or access an instance variable) on a null reference. In this case the error is on line 197 of your "RoadWorld" class, which I can see from:
at RoadWorld.endLevel(RoadWorld.java:197)
sharifahhilwa sharifahhilwa

2014/8/19

#
got it!! Thankss
You need to login to post a reply.