The scenario lets me compile it, but when I try to add one of the actors a screen pops up with this message:
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.getX(Actor.java:157)
at Animal.atWorldEdge(Animal.java:59)
at Kitty.<init>(Kitty.java:40)
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:525)
at greenfoot.core.Simulation.newInstance(Simulation.java:578)
at greenfoot.localdebugger.LocalDebugger$QueuedInstantiation.run(LocalDebugger.java:155)
at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:465)
at greenfoot.core.Simulation.maybePause(Simulation.java:279)
at greenfoot.core.Simulation.runContent(Simulation.java:210)
at greenfoot.core.Simulation.run(Simulation.java:203)
Here is my code. This happened after I added the atWorldEdge method, but I copied it from one of the other actors I have and that one works fine. I don't know what I screwed up.