Okay, thank you very much for everything.


import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Ballon here. * * @author (your name) * @version (a version number or a date) */ public class Ballon extends Actor { /** * Act - do whatever the Ballon wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { move(-4); if (Greenfoot.getRandomNumber(100)<50) { setLocation(getX(),getY() + 5); } if (getX()<10) { // the line under this is where Greenfoot is saying the error is world.removeObject(this); } } }