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

Comments for Carrera acuatica

Return to Carrera acuatica

delmardelmar

2008/10/27

No objects? You have to write code in your world's constructor to place the initial objects. (See some other scenarios for sample code.) In the exported version, we cannot interactively create objects...
A new version of this scenario was uploaded on Wed Nov 05 15:22:18 UTC 2008
A new version of this scenario was uploaded on Fri Nov 21 01:36:36 UTC 2008
delmardelmar

2008/11/21

Anything moving yet?
A new version of this scenario was uploaded on Mon Dec 01 00:41:38 UTC 2008
A new version of this scenario was uploaded on Thu Dec 04 19:27:09 UTC 2008
A new version of this scenario was uploaded on Wed Dec 10 06:19:37 UTC 2008
A new version of this scenario was uploaded on Thu Dec 11 04:01:21 UTC 2008
A new version of this scenario was uploaded on Mon Dec 15 20:05:35 UTC 2008
mjrb4mjrb4

2008/12/17

I can see a greenfoot and a barrel appear seemingly randomly after I click the buttons a few times...
A new version of this scenario was uploaded on Sat Jan 03 23:41:13 UTC 2009
mjrb4mjrb4

2009/1/4

It keeps generating a nullpointerexception for me - it's hard to know what exactly is going on without the source to look at, but a good start would be to make sure that you're referring to all the images you're using in the right case and you've declared them all properly. If it helps you sort the problem, the console output I'm getting is: java.lang.NullPointerException at greenfoot.util.GraphicsUtilities.toCompatibleTranslucentImage(GraphicsUtilities.java:274) at greenfoot.util.GraphicsUtilities.loadCompatibleTranslucentImage(GraphicsUtilities.java:221) at greenfoot.GreenfootImage.loadURL(GreenfootImage.java:143) at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:167) at greenfoot.GreenfootImage.<init>(GreenfootImage.java:70) at greenfoot.World.setBackground(World.java:152) at Mar.iniciaJuego(Mar.java:190) at Iniciar.act(Iniciar.java:24) at greenfoot.core.Simulation.runOneLoop(Simulation.java:199) at greenfoot.core.Simulation.run(Simulation.java:128) If you want to post the source, I and others might be able to help a bit more :) Also, what's the scenario meant to do?
A new version of this scenario was uploaded on Sun Jan 04 03:28:28 UTC 2009
mjrb4mjrb4

2009/1/4

Adding the with-source tag doesn't add the source automatically, you also need to select the "publish source code" check box.
BlackholeGFBlackholeGF

2009/1/4

It just doesn't work....sorry
A new version of this scenario was uploaded on Mon Jan 05 17:39:39 UTC 2009
A new version of this scenario was uploaded on Fri Jan 16 18:14:44 UTC 2009
mjrb4mjrb4

2009/1/17

The problem is the case sensitive filenames. You've got to refer to the file in the code in exactly the same case that it is in the directory, in this case your mar.JPG needed to renamed mar.jpg. If you do that and re-upload, it should work fine. Incidentally, the new version of Greenfoot (1.5) will warn you about this, which should make this problem disappear from the gallery once people use the new version! java.lang.IllegalArgumentException: Filename 'mar.jpg' has the wrong case. It should be: 'mar.JPG' at greenfoot.util.GreenfootUtil.checkCase(GreenfootUtil.java:547) at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:515) at greenfoot.GreenfootImage.loadFile(GreenfootImage.java:170) at greenfoot.GreenfootImage.<init>(GreenfootImage.java:75) at greenfoot.World.setBackground(World.java:176) at Mar.iniciaJuego(Mar.java:245) at Iniciar.act(Iniciar.java:16) at greenfoot.core.Simulation.runOneLoop(Simulation.java:286) at greenfoot.core.Simulation.run(Simulation.java:157)