When I kill one of the terrorist in my game, I get an error but I do not see the exact cause.
java.lang.NullPointerException
at Player.bopHead(Player.java:32)
at Player.platformAbove(Player.java:73)
at Player.act(Player.java:15)
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)
java.lang.NullPointerException
at Player.bopHead(Player.java:32)
at Player.platformAbove(Player.java:73)
at Player.act(Player.java:15)
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)
java.lang.IllegalArgumentException: java.io.FileNotFoundException: Could not find file: TerroristR9.png
at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:293)
at greenfoot.GreenfootImage.<init>(GreenfootImage.java:109)
at Terrorist.<init>(Terrorist.java:20)
at Wolfbase.initiateLevel(Wolfbase.java:33)
at Wolfbase.<init>(Wolfbase.java:17)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at greenfoot.core.Simulation.newInstance(Simulation.java:581)
at greenfoot.platforms.ide.WorldHandlerDelegateIDE$3.run(WorldHandlerDelegateIDE.java:409)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:468)
at greenfoot.core.Simulation.maybePause(Simulation.java:281)
at greenfoot.core.Simulation.runContent(Simulation.java:212)
at greenfoot.core.Simulation.run(Simulation.java:205)
Caused by: java.io.FileNotFoundException: Could not find file: TerroristR9.png
at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:537)
at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:290)
... 14 more
java.lang.IllegalArgumentException: java.io.FileNotFoundException: Could not find file: TerroristR9.png
at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:293)
at greenfoot.GreenfootImage.<init>(GreenfootImage.java:109)
at Terrorist.<init>(Terrorist.java:20)
at Wolfbase.initiateLevel(Wolfbase.java:33)
at Wolfbase.<init>(Wolfbase.java:17)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at greenfoot.core.Simulation.newInstance(Simulation.java:581)
at greenfoot.platforms.ide.WorldHandlerDelegateIDE$3.run(WorldHandlerDelegateIDE.java:409)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:468)
at greenfoot.core.Simulation.maybePause(Simulation.java:281)
at greenfoot.core.Simulation.runContent(Simulation.java:212)
at greenfoot.core.Simulation.run(Simulation.java:205)
Caused by: java.io.FileNotFoundException: Could not find file: TerroristR9.png
at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:537)
at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:290)
... 14 more
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:663)
at greenfoot.Actor.getOneObjectAtOffset(Actor.java:867)
at Enemy.moveAround(Enemy.java:30)
at Terrorist.act(Terrorist.java:35)
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)

