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

2018/9/8

I can´t save my world :(

Mauli Mauli

2018/9/8

#
Hello, so I haven´t worked with greenfoot for so long and there is one problem I have all the time. (Btw I am working with the roboter scenario.) When I try to save my world the screen becomes gray and my subclass robotworld is crossed out red. I then opened the subclass editor and it tells me that the method "prepare();", which i didnt put there, is invalid. I dont know where this method comes from. even if i open a new world and instantly try to save it, that showes up:( I don´t know what i´m supposed to do. please help me
Super_Hippo Super_Hippo

2018/9/8

#
I never really used that feature, but when I create a new scenario, create a new MyWorld and then save the world, it creates an empty prepare method and a call to it from the constructor. (So no error.) Could you reproduce it with the a new scenario and post the resulting code? Also, which version of Greenfoot are you using?
Steven81 Steven81

2018/9/9

#
I downloaded the new version of Greenfoot. If I want to save the world, the method "prepare ()" is created in the constructor of my world, but not the method with the objects to be created. This worked fine on the older versions of Greenfoot. Seems to be a bug ... It works if you create the public void prepare () method by hand in the world before saving.
nccb nccb

2018/9/11

#
This sounds like it might be a Greenfoot bug, but like Super_Hippo, I can't reproduce it. If you have a scenario where this problem is occurring, we'd be grateful if you could zip it up and send it to us at support@greenfoot.org then we can take a look to fix the problem.
achingz achingz

2018/9/16

#
I got the same problem. Saving the world BEFORE pressing the act/run buttons.
nccb nccb

2018/9/18

#
We've now replicated such an issue and fixed the bug ready for 3.5.1. Try the following to see if it also fixes the issue for you -- open your world class editor, then go to the very end of the class, and press return a couple of times to add a blank line at the end. The bug we found seemed to relate to the lack of a newline at the end of the file confusing the editor.
You need to login to post a reply.