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

2014/1/9

Help with bug. (urgent)

chrl98 chrl98

2014/1/9

#
Hi, I'm back on the forums. For some reason, after my friends have messed with the scenario, the TerrainWorld keeps generating a new Terrain each time, thus changing the path and the location of the trees every few seconds. I will upload the scenario and remove it immediately, since I have not yet gotten permission to the uploader. I will need some help in identifying the source of the problem. The scenario can be found here. http://www.greenfoot.org/scenarios/10584 (this is a modification of bourne's scenario, and is not intended for release to the general public) *EDIT* Basically what my friend did was that he pressed the "Run" button to start my game, but when it did not respond, he pressed "Reset" and tried again, and then this problem occurred. *EDIT 2* I'm very sure that no code has been removed.
chrl98 chrl98

2014/1/9

#
Please???
danpost danpost

2014/1/9

#
Will try to look into it.
chrl98 chrl98

2014/1/9

#
Thanks.
danpost danpost

2014/1/9

#
Your constructor for 'TerrainWorld' adds a 'Play' object into the world. The 'Play' object has as the last line of its act method an unconditional 'setWorld' command to a 'new TerrainWorld' world object. This is a basic 'infinite loop'.
chrl98 chrl98

2014/1/9

#
Thanks danpost :). Guess I accidentally added it. Scenario will be removed now.
You need to login to post a reply.