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

2018/12/3

Instantiate a new World Object

fittirc04 fittirc04

2018/12/3

#
Hi guys, this might be a simple answer but I'm stuck. I was in the middle of working on my scenario and I pressed the terminate button in the debugger window. Now I'm getting the "Instantiate a new World Object" when I open my project. Everything was working fine until I pressed that button (shouldn't have pressed it to being with). I've tried reinstalling Greenfoot and copy/pasting my code into a new scenario, but still getting the same message. Any help appreciated.
nccb nccb

2018/12/3

#
If you use Greenfoot's terminate, it presumes that there may have been an error (like an infinite loop) in the world's code. So by default it will not create a new World for you next time, in case you just activate the same infinite loop. The fix is to right-click on your world class (MyWorld or whatever), then select "new MyWorld()" (or whatever the name of your world is). That will bring back your world, and resume Greenfoot's behaviour of creating the world automatically.
fittirc04 fittirc04

2018/12/3

#
Whew, you're a lifesaver! Ty nccb!
You need to login to post a reply.