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

2013/2/28

File Reader/Writer on Greenfoot webside

Gevater_Tod4711 Gevater_Tod4711

2013/2/28

#
Isn't it possible to use a file reader or writer on the webside? My game "Call of Worms" just doesn't start on the webside. If I run it on my computer it works perfectly. In the stack trace there it says that there is a NullPointerException when I try to use a fileReader in the world consructor. Any ideas why this doesn't work and how I can fix it?
danpost danpost

2013/2/28

#
Gevater_Tod4711 wrote...
Isn't it possible to use a file reader or writer on the webside?
Writing to files is not allowed on the site for security reasons. An exception to this is the UserInfo class data storage provided in Greenfoot 2.2.0+ which is limited to one score, ten integers and five Strings of fifty characters each. Reading files within your scenario is allowed, however. Make sure that your path/names are based on current directory location and that the file is within the scenario folder
Gevater_Tod4711 Gevater_Tod4711

2013/2/28

#
Ok for security reasons that sounds reasonable. Then I have to delete this in the upload version of my game. Thank you for the reply.
You need to login to post a reply.