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

2014/11/25

How do I get my game to stop?

Danny765C Danny765C

2014/11/25

#
I keep on trying to put Greenfoot.stop(); after the if( canSee(Earthbender)); but when I shoot a fire ball out of my fire bender, the games stops. it doesnt even reach the end of the map. How do I get it to stop properly?
danpost danpost

2014/11/26

#
Did you really do this:
if (canSee(Earthbender));
with the semi-colon at the end -- before the 'Greenfoot.stop();'?
Danny765C Danny765C

2014/11/26

#
yes I did
danpost danpost

2014/11/26

#
Did you remove it to fix it? (the semi-colon completes the if block, so the code to stop executes whether the 'if' condition was true or false)
Danny765C Danny765C

2014/11/26

#
thank you so much, it worked! you just saved my grade
You need to login to post a reply.