G'day.. i was reading through some forums and i saw this code for a button to move to a different world after it is clicked. However, it says 'cannot find symbol- variable spacelevel1'
this is my code:
World world; world = getWorld(); Greenfoot.setWorld(new YOURWORLDNAMEHERE());
public class Playbutton extends Actor
{
public void act()
{
if (Greenfoot.mouseClicked(this))
{
World world;
world = getWorld();
Greenfoot.setWorld(new YOURWORLDNAMEHERE());
}
}
}public class Playbutton extends Actor
{
public void act()
{
if (Greenfoot.mouseClicked(this))
{
Greenfoot.setWorld(new YOURWORLDNAMEHERE());
}
}
}