This is the error code i get.
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:711)
at greenfoot.Actor.isTouching(Actor.java:972)
at Crab.<init>(Crab.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at greenfoot.core.Simulation.newInstance(Simulation.java:617)
at greenfoot.localdebugger.LocalDebugger$QueuedInstantiation.run(LocalDebugger.java:155)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:502)
at greenfoot.core.Simulation.maybePause(Simulation.java:305)
at greenfoot.core.Simulation.runContent(Simulation.java:218)
at greenfoot.core.Simulation.run(Simulation.java:211)
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:711)
at greenfoot.Actor.isTouching(Actor.java:972)
at Crab.<init>(Crab.java:32)
at Worm.<init>(Worm.java:9)
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:711)
at greenfoot.Actor.isTouching(Actor.java:972)
at Crab.<init>(Crab.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at greenfoot.core.Simulation.newInstance(Simulation.java:617)
at greenfoot.localdebugger.LocalDebugger$QueuedInstantiation.run(LocalDebugger.java:155)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:502)
at greenfoot.core.Simulation.maybePause(Simulation.java:305)
at greenfoot.core.Simulation.runContent(Simulation.java:218)
at greenfoot.core.Simulation.run(Simulation.java:211)
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:711)
at greenfoot.Actor.isTouching(Actor.java:972)
at Crab.<init>(Crab.java:32)
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:711)
at greenfoot.Actor.isTouching(Actor.java:972)
at Crab.<init>(Crab.java:32)
