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

2014/6/11

i have some problems with somthing i am doing

987987aris 987987aris

2014/6/11

#
java.lang.NullPointerException at PlayerPink.act(PlayerPink.java:16) 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) can someone explain me what those error are
davmac davmac

2014/6/11

#
It's just one error. At line 16 of your PlayerPink class, you are dereferencing a null reference. That is, you have obtained a null value and are trying to call a method on it (or access a variable with it). java.lang.NullPointerException - is the type of the error at PlayerPink.act(PlayerPink.java:16) - tells you where it happened The rest: 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) ... is a "stack trace", showing you where your method was called from. In this case, your method was called from inside Greenfoot ("greenfoot.core.<xxx>") so the information is not useful.
You need to login to post a reply.