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

2012/3/22

What? Scenario not loading when uploaded?

1
2
3
4
danpost danpost

2012/3/23

#
I am sorry, but after carefully looking over your code, I do not see anything that could be the cause of the aforementioned error. I wish that I could be more helpful on this matter.
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
I am sorry, but after carefully looking over your code, I do not see anything that could be the cause of the aforementioned error. I wish that I could be more helpful on this matter.
It is okay - It is just that I really can't see why this wouldn't work at all. I need davmac Please WAKE UP! ARRGH!
danpost danpost

2012/3/23

#
Maybe you could move the Object and Recipe classes outside the Editor class as seperate abstract classes and see if it works that way.
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
Maybe you could move the Object and Recipe classes outside the Editor class as seperate abstract classes and see if it works that way.
What I don't get is why the object class doesn't get an error, because that array is initalized first. I will give it a go.
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
Maybe you could move the Object and Recipe classes outside the Editor class as seperate abstract classes and see if it works that way.
Didn't work.
danpost danpost

2012/3/23

#
I noticed that also (???maybe you are only allowed one???) I am not that familiar with abstract classes written within another class like this. EDITED: Well, I guess that answers that question ^^^ (Not limited) though I really did not think there would be.
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
I noticed that also (???maybe you are only allowed one???) I am not that familiar with abstract classes written within another class like this. EDITED: Well, I guess that answers that question ^^^ (Not limited) though I really did not think there would be.
Wait - it may have worked just now I am getting another error, that again, doesn't make sense;
java.lang.IllegalArgumentException: Could not open sound file: New Folder
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:115)
	at greenfoot.sound.SoundFactory.getCachedSound(SoundFactory.java:130)
	at greenfoot.sound.SoundFactory.<init>(SoundFactory.java:67)
	at greenfoot.sound.SoundFactory.getInstance(SoundFactory.java:77)
	at greenfoot.export.GreenfootScenarioViewer.init(GreenfootScenarioViewer.java:180)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Could not find file: New Folder
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:532)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:95)
	... 6 more
TheNightStrider TheNightStrider

2012/3/23

#
Anyone seen that error before?
danpost danpost

2012/3/23

#
Out of curiosity, change the name of the Object class to something else (as Object is a super-class of Actor) and see if it does not bomb out at that one first, then. EDITED: ignore this (as I now see your last post)
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
Out of curiosity, change the name of the Object class to something else (as Object is a super-class of Actor) and see if it does not bomb out at that one first, then.
Imaginatively , I called them all OObject now, and again, no difference was made.
TheNightStrider TheNightStrider

2012/3/23

#
And now this:
java.lang.NullPointerException
	at greenfoot.core.ProjectProperties.load(ProjectProperties.java:93)
	at greenfoot.core.ProjectProperties.<init>(ProjectProperties.java:82)
	at greenfoot.export.GreenfootScenarioViewer.init(GreenfootScenarioViewer.java:152)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException
TheNightStrider TheNightStrider

2012/3/23

#
None of these new errors have a reference to my code; I think I worked the problem with recipe, but now this?
danpost danpost

2012/3/23

#
It says it is trying to locate a sound file called 'New Folder', which obviously is a folder name (not a filename). Any idea what sound file it was trying to locate? Could you tell where in your program it bombed by the error message?
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
It says it is trying to locate a sound file called 'New Folder', which obviously is a folder name (not a filename). Any idea what sound file it was trying to locate? Could you tell where in your program it bombed by the error message?
To be honest, I have no idea. I saw that and so commented off the code:
private GreenfootSound one = new GreenfootSound("unbreakable.mp3");
I exported it as a website, and when it loaded i got that error. The in-greenfoot stuff still works fine
TheNightStrider TheNightStrider

2012/3/23

#
danpost wrote...
It says it is trying to locate a sound file called 'New Folder', which obviously is a folder name (not a filename). Any idea what sound file it was trying to locate? Could you tell where in your program it bombed by the error message?
And anyway, if it was a problem with my code, surely it would give a reference to a line, but instead it is referencing java?
There are more replies on the next page.
1
2
3
4