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

2013/8/25

help with adding object

spower21 spower21

2013/8/25

#
i am making a game and having trouble adding an object because "variable not found"
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)


/**
 * Write a description of class BriHouse here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class BriHouse extends ScrollingWorld
{

    /**
     * Constructor for objects of class BriHouse.
     * 
     */
    public BriHouse()
    {    
        // Create a new world with 600x400 cells with a cell size of 1x1 pixels.
        super(600, 400, 1); 
        addObject(bri, 300, 200);
        
    }
}
danpost danpost

2013/8/25

#
Where is 'bri' defined (used on line 21)? What is the class of the object you are trying to add there?
You need to login to post a reply.