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

2013/5/22

Game error

1
2
3
4
5
danpost danpost

2013/5/22

#
Change line 35 to 'this(null);'.
geekykid2013 geekykid2013

2013/5/22

#
I have changed the code to this(null); but i get the following error - call to this statement must be the first statement to the constructor
danpost danpost

2013/5/22

#
What else did you change in the beginning of the SquareWorld class? please re-post what you have there.
geekykid2013 geekykid2013

2013/5/22

#
This is what i have changed in the code Code begins here
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;

/**
 * 
 * The square world. The square world has Gold Eggs that need to be collected
 * 
 * @author  
 * @version 1.0
 */



public class SquareWorld extends World
{
    // private static final int GAP = 12;

    private Counter counter; // fields for Counter class
    private HealthBar healthBar; //Fields for HealthBar
    private Paddle paddle; // Fields for Paddle
    private Robot robot; // Fields Robot
    
    /**
     * Constructor for objects of class SquareWorld.
     * 
     */
    
        public SquareWorld(Robot inRobot)  
    {  
        super(700, 700, 1,true); // first line Constructor 
        robot = inRobot;  
        // whatever code you have in the other constructor  
    }  
       // your other constructor should call the one above like this  
        public SquareWorld()  
    {  
        super(700, 700, 1,true); // second line Constructor 
        
        this(null);  
    }  
    
     
    {   
        //super(700, 700, 1, true); // Create a new world with 700x700 cells with a cell size of 1x1 pixels.
        setPaintOrder ( Robot.class, Smoke.class );
        if (inRobot == null) counter = new Counter();
        else counter = inRobot.getCounter();
        addObject (counter, 100, 678);
        if (inRobot == null) healthBar = new HealthBar ("Robot Health", "", 100, 100);
        else healthBar = inRobot.getHealthBar();
        addObject(healthBar, 600, 678);
        if (inRobot == null) robot = new Robot(counter, healthBar);
        else robot = inRobot;
        addObject(robot, getWidth() / 2, getHeight() - 90);
        if (inRobot == null) robot = new Robot(counter, healthBar);
        else robot = inRobot;
        addObject(robot, getWidth() / 2, getHeight() - 90);
        paddle = new Paddle(robot); // set the Paddle to the world
        addObject ( paddle, getWidth() / 2, getHeight() - 55); //add the paddle object to th world
        
        //prepare();
    }
    
        //counter = new Counter(); // set the counter to the world
        //addObject (counter, 100, 678); // add the counter object to the world
        //healthBar = new HealthBar("Robot Health", "", 100, 100);
        //addObject(healthBar, 600, 678);
        //robot = new Robot(counter, healthBar);
        //addObject(robot, getWidth() / 2, getHeight() - 90);
        //paddle = new Paddle(robot); // set the Paddle to the world
        //addObject ( paddle, getWidth() / 2, getHeight() - 55); //add the paddle object to the world
    
    //}
    
    

    //public void RobotIsOut()
    //{
    //    paddle.newRobot();
    //}

   // public void score()
    //{
      //  counter.addScore();
    //}
    
    /**
     * Prepare the world for the start of the program. That is: create the initial
     * objects and add them to the world.
     */
    private void prepare()
    {

        //Counter counter = new Counter();
        //addObject(counter, 100, 678);

        goldEgg goldegg = new goldEgg();
        addObject(goldegg, 319, 404);
        goldegg.setLocation(309, 397);
        goldEgg goldegg2 = new goldEgg();
        addObject(goldegg2, 316, 190);
        goldegg2.setLocation(308, 182);
        goldEgg goldegg3 = new goldEgg();
        addObject(goldegg3, 465, 262);
        goldegg3.setLocation(458, 259);
        goldEgg goldegg4 = new goldEgg();
        addObject(goldegg4, 556, 95);
        goldegg4.setLocation(552, 95);
        goldEgg goldegg5 = new goldEgg();
        addObject(goldegg5, 145, 97);
        goldegg5.setLocation(143, 91);
        goldEgg goldegg6 = new goldEgg();
        addObject(goldegg6, 151, 266);
        goldegg6.setLocation(142, 258);
        goldEgg goldegg7 = new goldEgg();
        addObject(goldegg7, 557, 417);
        goldegg7.setLocation(555, 411);
        goldEgg goldegg8 = new goldEgg();
        addObject(goldegg8, 237, 335);
        goldegg8.setLocation(232, 332);
        goldEgg goldegg9 = new goldEgg();
        addObject(goldegg9, 353, 291);
        goldegg9.setLocation(346, 286);
        goldEgg goldegg10 = new goldEgg();
        addObject(goldegg10, 146, 493);
        goldegg10.setLocation(144, 486);
        goldEgg goldegg11 = new goldEgg();
        addObject(goldegg11, 389, 494);
        goldegg11.setLocation(386, 483);
        goldEgg goldegg12 = new goldEgg();
        addObject(goldegg12, 564, 268);
        goldegg12.setLocation(553, 259);
        goldEgg goldegg13 = new goldEgg();
        addObject(goldegg13, 394, 100);
        goldegg13.setLocation(388, 91);
        redEgg redegg = new redEgg();
        addObject(redegg, 234, 100);
        redegg.setLocation(227, 92);
        blueEgg blueegg = new blueEgg();
        addObject(blueegg, 314, 100);
        blueegg.setLocation(307, 93);
        redEgg redegg2 = new redEgg();
        addObject(redegg2, 472, 101);
        redegg2.setLocation(462, 88);
        yellowEgg yellowegg = new yellowEgg();
        addObject(yellowegg, 393, 187);
        yellowegg.setLocation(389, 181);
        yellowEgg yellowegg2 = new yellowEgg();
        addObject(yellowegg2, 464, 334);
        yellowegg2.setLocation(453, 332);
        redEgg redegg3 = new redEgg();
        addObject(redegg3, 239, 267);
        redegg3.setLocation(233, 260);
        blueEgg blueegg2 = new blueEgg();
        addObject(blueegg2, 152, 341);
        blueegg2.setLocation(143, 332);
        blueEgg blueegg3 = new blueEgg();
        addObject(blueegg3, 464, 195);
        blueegg3.setLocation(458, 187);
        yellowEgg yellowegg3 = new yellowEgg();
        addObject(yellowegg3, 560, 190);
        yellowegg3.setLocation(553, 185);
        redEgg redegg4 = new redEgg();
        addObject(redegg4, 149, 418);
        redegg4.setLocation(144, 412);
        blueEgg blueegg4 = new blueEgg();
        addObject(blueegg4, 149, 195);
        blueegg4.setLocation(141, 182);
        yellowEgg yellowegg4 = new yellowEgg();
        addObject(yellowegg4, 236, 191);
        yellowegg4.setLocation(230, 184);
        redEgg redegg5 = new redEgg();
        addObject(redegg5, 456, 403);
        redegg5.setLocation(454, 394);
        yellowEgg yellowegg5 = new yellowEgg();
        addObject(yellowegg5, 241, 401);
        yellowegg5.setLocation(231, 392);
        redEgg redegg6 = new redEgg();
        addObject(redegg6, 307, 496);
        redegg6.setLocation(304, 486);
        blueEgg blueegg5 = new blueEgg();
        addObject(blueegg5, 388, 402);
        blueegg5.setLocation(381, 395);
        blueEgg blueegg6 = new blueEgg();
        addObject(blueegg6, 559, 340);
        blueegg6.setLocation(554, 335);
        yellowEgg yellowegg6 = new yellowEgg();
        addObject(yellowegg6, 558, 493);
        yellowegg6.setLocation(553, 490);
        redEgg redegg7 = new redEgg();
        addObject(redegg7, 233, 491);
        redegg7.setLocation(227, 485);
        blueEgg blueegg7 = new blueEgg();
        addObject(blueegg7, 472, 492);
        blueegg7.setLocation(461, 481);
        removeObject(redegg4);
        redEgg redegg8 = new redEgg();
        addObject(redegg8, 148, 416);
        redegg8.setLocation(142, 408);
    } 
    
    
}
danpost danpost

2013/5/22

#
Remove line 37. Line 39 will cause the 'super' call on line 30 to be executed.
danpost danpost

2013/5/22

#
You still have not correctly started the class as indicated in the last code post on page one of this discussion.
geekykid2013 geekykid2013

2013/5/22

#
Below are what I believe to be the two constructor methods suggested on page 1. I have assigned inRobot to the variable robot in the SquareWorld() class. I have also passed the following parameters to the super() method I have used the this keyword to call the constructor above also. I cannot see what I am being asked to change
    public SquareWorld(Robot inRobot)  
    {  
        super(700, 700, 1,true); // first line Constructor 
        robot = inRobot;  
        // whatever code you have in the other constructor  
    }  
       // your other constructor should call the one above like this  
        public SquareWorld()  
    {  
        //super(700, 700, 1,true); // second line Constructor 
        
        this(null);  
    } 
danpost danpost

2013/5/22

#
danpost wrote...
Begin your SquareWorld class like this:
import greenfoot.*;
import java.awt.Color;

public class SquareWorld extends World
{
    private Counter counter;
    private HealthBar healthBar;
    private Paddle paddle;
    private Robot robot;

    public SquareWorld()
    {
        this(null);
    }

    public SquareWorld(Robot inRobot)
    {
        super(700, 700, 1, true );
        setPaintOrder ( Robot.class, Smoke.class );
        if (inRobot == null) counter = new Counter();
        else counter = inRobot.getCounter();
        addObject (counter, 100, 678);
        if (inRobot == null) healthBar = new HealthBar("Robot Health", "", 100, 100);
        else healthBar = inRobot.getHealthBar();
        addObject(healthBar, 600, 678);
        if (inRobot == null) robot = new Robot(counter, healthBar);
        else robot = inRobot;
        addObject(robot, getWidth() / 2, getHeight() - 90);
        paddle = new Paddle(robot); // set the Paddle to the world
        addObject ( paddle, getWidth() / 2, getHeight() - 55); //add the paddle object to the world
    
        

       //prepare();
    }
    // etc.
This is the post I was referring to. The first constructor is complete, and starts on line 11. The other constructor starts on line 16, and is not complete. The rest consists of the rest of the code you originally had for the constructor of this class (see my comments within the code).
geekykid2013 geekykid2013

2013/5/23

#
Okay it does work. But when I first wrote the code I included the following code as written on page 1. How is this code different from the new suggestion? Also when I press the arrow keys to move the paddle and the robot object left and right, inside the SquareWorld(), Greenfoot creates a copy of a second robot object fixed to its location
public SquareWorld (Robot inRobot)
{
   super (700, 700, 1, true);
    robot inRobot
}

public SquareWorld()
{
   this(new Robot());
}
danpost danpost

2013/5/23

#
When I posted the code to start your SquareWorld class code with, you were to drop anything previously given. As the discussion went on, I got a better idea of what you wanted to happen, and some adjusting to the code was necessary.
geekykid2013 geekykid2013

2013/5/23

#
Okay. but now when I run and move the paddle and robot object together using the arrow keys a duplicate ball appears on the screen, however there are no syntax errors in the code.
geekykid2013 geekykid2013

2013/5/23

#
what is an illegal argument exception?
danpost danpost

2013/5/23

#
You really need to start showing more details. Like the full error message given; the related code(s); etc. It is very difficult to help or explain what is going on without such information.
geekykid2013 geekykid2013

2013/5/23

#
Okay. The attached code is of the square world. when i run the program, and move the paddle and robot objects left to right with the arrow keys a duplicate "robot" object is created, but there are no syntax errors in the code. I'm not sure if the problem is in my SquareWorld class. could you take a look.
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;

/**
 * 
 * The square world. The square world has Gold Eggs that need to be collected
 * 
 * @author  
 * @version 1.0
 */
    public class SquareWorld extends World
    {
        
        private Counter counter;            // fields for Counter class
        private HealthBar healthBar;        //Fields for HealthBar
        private Paddle paddle;              // Fields for Paddle
        private Robot robot;                // Fields Robot
     
        GreenfootSound backgroundMusic = new GreenfootSound("breathe.mp3");
        
    /**
     * Constructor for objects of class SquareWorld.
     * 
     */
        
        public SquareWorld() // This is the First Constructor Method 
        {  
        this(null); 
        backgroundMusic.playLoop();
        } 
        
        public SquareWorld(Robot inRobot) // This is the Second Constructor Method
        {
        super(700, 700, 1, true); // Create a new world with 700x700 cells with a cell size of 1x1 pixels.
        setPaintOrder ( Robot.class, Smoke.class );
        if (inRobot == null) counter = new Counter();
        else counter = inRobot.getCounter();
        addObject (counter, 100, 678);
        if (inRobot == null) healthBar = new HealthBar ("Robot Health", "", 100, 100);
        else healthBar = inRobot.getHealthBar();
        addObject(healthBar, 600, 678);
        if (inRobot == null) robot = new Robot(counter, healthBar);
        else robot = inRobot;
        addObject(robot, getWidth() / 2, getHeight() - 90);
        if (inRobot == null) robot = new Robot(counter, healthBar);
        else robot = inRobot;
        addObject(robot, getWidth() / 2, getHeight() - 90);
        paddle = new Paddle(robot); // set the Paddle to the world
        addObject ( paddle, getWidth() / 2, getHeight() - 55); //add the paddle object to th world
        }
    
        //counter = new Counter(); // set the counter to the world
        //addObject (counter, 100, 678); // add the counter object to the world
        //healthBar = new HealthBar("Robot Health", "", 100, 100);
        //addObject(healthBar, 600, 678);
        //robot = new Robot(counter, healthBar);
        //addObject(robot, getWidth() / 2, getHeight() - 90);
        //paddle = new Paddle(robot); // set the Paddle to the world
        //addObject ( paddle, getWidth() / 2, getHeight() - 55); //add the paddle object to the world
    
    //}
    
    

    //public void RobotIsOut()
    //{
    //    paddle.newRobot();
    //}

   // public void score()
    //{
      //  counter.addScore();
    //}
    
    /**
     * Prepare the world for the start of the program. That is: create the initial
     * objects and add them to the world.
     */
    private void prepare()
    {

        //Counter counter = new Counter();
        //addObject(counter, 100, 678);

        goldEgg goldegg = new goldEgg();
        addObject(goldegg, 319, 404);
        goldegg.setLocation(309, 397);
        goldEgg goldegg2 = new goldEgg();
        addObject(goldegg2, 316, 190);
        goldegg2.setLocation(308, 182);
        goldEgg goldegg3 = new goldEgg();
        addObject(goldegg3, 465, 262);
        goldegg3.setLocation(458, 259);
        goldEgg goldegg4 = new goldEgg();
        addObject(goldegg4, 556, 95);
        goldegg4.setLocation(552, 95);
        goldEgg goldegg5 = new goldEgg();
        addObject(goldegg5, 145, 97);
        goldegg5.setLocation(143, 91);
        goldEgg goldegg6 = new goldEgg();
        addObject(goldegg6, 151, 266);
        goldegg6.setLocation(142, 258);
        goldEgg goldegg7 = new goldEgg();
        addObject(goldegg7, 557, 417);
        goldegg7.setLocation(555, 411);
        goldEgg goldegg8 = new goldEgg();
        addObject(goldegg8, 237, 335);
        goldegg8.setLocation(232, 332);
        goldEgg goldegg9 = new goldEgg();
        addObject(goldegg9, 353, 291);
        goldegg9.setLocation(346, 286);
        goldEgg goldegg10 = new goldEgg();
        addObject(goldegg10, 146, 493);
        goldegg10.setLocation(144, 486);
        goldEgg goldegg11 = new goldEgg();
        addObject(goldegg11, 389, 494);
        goldegg11.setLocation(386, 483);
        goldEgg goldegg12 = new goldEgg();
        addObject(goldegg12, 564, 268);
        goldegg12.setLocation(553, 259);
        goldEgg goldegg13 = new goldEgg();
        addObject(goldegg13, 394, 100);
        goldegg13.setLocation(388, 91);
        redEgg redegg = new redEgg();
        addObject(redegg, 234, 100);
        redegg.setLocation(227, 92);
        blueEgg blueegg = new blueEgg();
        addObject(blueegg, 314, 100);
        blueegg.setLocation(307, 93);
        redEgg redegg2 = new redEgg();
        addObject(redegg2, 472, 101);
        redegg2.setLocation(462, 88);
        yellowEgg yellowegg = new yellowEgg();
        addObject(yellowegg, 393, 187);
        yellowegg.setLocation(389, 181);
        yellowEgg yellowegg2 = new yellowEgg();
        addObject(yellowegg2, 464, 334);
        yellowegg2.setLocation(453, 332);
        redEgg redegg3 = new redEgg();
        addObject(redegg3, 239, 267);
        redegg3.setLocation(233, 260);
        blueEgg blueegg2 = new blueEgg();
        addObject(blueegg2, 152, 341);
        blueegg2.setLocation(143, 332);
        blueEgg blueegg3 = new blueEgg();
        addObject(blueegg3, 464, 195);
        blueegg3.setLocation(458, 187);
        yellowEgg yellowegg3 = new yellowEgg();
        addObject(yellowegg3, 560, 190);
        yellowegg3.setLocation(553, 185);
        redEgg redegg4 = new redEgg();
        addObject(redegg4, 149, 418);
        redegg4.setLocation(144, 412);
        blueEgg blueegg4 = new blueEgg();
        addObject(blueegg4, 149, 195);
        blueegg4.setLocation(141, 182);
        yellowEgg yellowegg4 = new yellowEgg();
        addObject(yellowegg4, 236, 191);
        yellowegg4.setLocation(230, 184);
        redEgg redegg5 = new redEgg();
        addObject(redegg5, 456, 403);
        redegg5.setLocation(454, 394);
        yellowEgg yellowegg5 = new yellowEgg();
        addObject(yellowegg5, 241, 401);
        yellowegg5.setLocation(231, 392);
        redEgg redegg6 = new redEgg();
        addObject(redegg6, 307, 496);
        redegg6.setLocation(304, 486);
        blueEgg blueegg5 = new blueEgg();
        addObject(blueegg5, 388, 402);
        blueegg5.setLocation(381, 395);
        blueEgg blueegg6 = new blueEgg();
        addObject(blueegg6, 559, 340);
        blueegg6.setLocation(554, 335);
        yellowEgg yellowegg6 = new yellowEgg();
        addObject(yellowegg6, 558, 493);
        yellowegg6.setLocation(553, 490);
        redEgg redegg7 = new redEgg();
        addObject(redegg7, 233, 491);
        redegg7.setLocation(227, 485);
        blueEgg blueegg7 = new blueEgg();
        addObject(blueegg7, 472, 492);
        blueegg7.setLocation(461, 481);
        removeObject(redegg4);
        redEgg redegg8 = new redEgg();
        addObject(redegg8, 148, 416);
        redegg8.setLocation(142, 408);
    } 
    
}
geekykid2013 geekykid2013

2013/5/23

#
I have also included .mp3 sound files into my world and for buttons. But now I am receiving exceptions errors. can you help?
java.lang.IllegalArgumentException: Could not open sound file: Breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:22)
	at SquareWorld.<init>(SquareWorld.java:25)
	at ContinueButton.act(ContinueButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: Breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:22)
	at SquareWorld.<init>(SquareWorld.java:25)
	at ContinueButton.act(ContinueButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:22)
	at SquareWorld.<init>(SquareWorld.java:25)
	at ContinueButton.act(ContinueButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:13)
	at SquareWorld.<init>(SquareWorld.java:26)
	at ContinueButton.act(ContinueButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:13)
	at SquareWorld.<init>(SquareWorld.java:26)
	at ContinueButton.act(ContinueButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:13)
	at SquareWorld.<init>(SquareWorld.java:26)
	at ContinueButton.act(ContinueButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: breathe.mp3
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.GreenfootSound.<init>(GreenfootSound.java:54)
	at SquareWorld.<init>(SquareWorld.java:13)
	at SquareWorld.<init>(SquareWorld.java:26)
	at RestartGameButton.act(RestartGameButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: breathe.mp3
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 8 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
java.lang.IllegalArgumentException: Could not open sound file: ContinueButton
	at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
	at greenfoot.Greenfoot.playSound(Greenfoot.java:162)
	at MenuButton.act(MenuButton.java:20)
	at greenfoot.core.Simulation.actActor(Simulation.java:565)
	at greenfoot.core.Simulation.runOneLoop(Simulation.java:523)
	at greenfoot.core.Simulation.runContent(Simulation.java:213)
	at greenfoot.core.Simulation.run(Simulation.java:203)
Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton
	at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534)
	at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
	... 6 more
There are more replies on the next page.
1
2
3
4
5