Yes, you are getting the same error, but you should get a line written above the error (you may have to resize the window).


if (input != null)
Greenfoot.delay(1);
//whenever a life is lost ((Galgen) getWorld().getObjects(Galgen.class).get(0)).nextImage();
private int currentImage = -1; private GreenfootImage[] images = { new GreenfootImage("galgen1.png"), new GreenfootImage("galgen2.png"), //... }; public Galgen() { nextImage(); } public void nextImage() { currentImage++; images[currentImage]; }
images [currentImage];