Hi. I'm hoping someone could help me. I'm trying to create a Scribblenauts-type game where users can input text into a box and then the item would appear. I had started by setting up a box to accept text input, which was actually working but now I'm getting the following compiling error and can't figure out why.
"no suitable constructor found for World() - constructor greenfoot.World.World(int,int.int.boolean) is not applicable (actual and formal argument lists differ in length) - construtor greenfoot.World.World(int,int.int) is not applicable (actual and formal argument lists differ in length)
Any advice would be most appreciated!
Here's the code for world():
public class world extends World
{
boolean gettingNumber = false;
boolean gettingLetter = false;
/**
* Constructor for objects of class world.
*
*/
public world() {
String text = "";
super(600, 400, 1);
act();
prepare();
addObject(new TextInputBox(), 300, 50);
gettingNumber = true;
}
public void act()
{
if (gettingNumber && getObjects(TextInputBox.class).isEmpty())
{
gettingNumber = false;
System.out.println("" + TextInputBox.value);
}
}
/**
* Prepare the world for the start of the program. That is: create the initial
* objects and add them to the world.
*/
private void prepare()
{
Terrain terrain = new Terrain();
addObject(terrain, 133, 392);
terrain.setLocation(126, 384);
Terrain terrain2 = new Terrain();
addObject(terrain2, 385, 392);
terrain2.setLocation(379, 385);
terrain.setLocation(125, 385);
terrain2.setLocation(374, 385);
Terrain terrain3 = new Terrain();
addObject(terrain3, 482, 392);
terrain3.setLocation(482, 385);
Maxwell maxwell = new Maxwell();
addObject(maxwell, 270, 254);
removeObject(maxwell);
Maxwell maxwell2 = new Maxwell();
addObject(maxwell2, 251, 332);
maxwell2.setLocation(250, 324);
}
}
--
Thanks so much for any help!!

