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

2012/10/19

I cannot Figure this stupid runtime error out i need help plaease

Southpaw1357 Southpaw1357

2012/10/19

#
Southpaw1357 Southpaw1357

2012/10/19

#
The scenario is the Link stating "If you can help please leave a comment of the solution"
nccb nccb

2012/10/19

#
Your die() method is executed before your eat() method. The run-time error is occurring because you call die(), remove yourself from the world, then call eat(), which checks if you can see any worms. Checking if you can see something when you are not in the world gives the error that the actor is not in the world. Probably the simplest fix is to switch the order of die() and eat().
Southpaw1357 Southpaw1357

2012/10/19

#
OMG thank you so much i was just looking to in depth and not right in front of me!!!!!!!!
You need to login to post a reply.