I am making a video game scroll world and so far i have typed this:
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class ScrollWorld extends World
{
int baseX=0;
// 'bgi' stands for Background Image
GreeenfootImage bgi = new GreenfootImage ("scrolling_background.png");
int bgiwidth = bgi.getwidth();
public ScrollWorld()
{
super(1583, 400, 1);
update();
}
}
Public void act ()
{
baseX=(baseX + bgiwidth - 1)%bgiwidth;
update();
}
Private void update()
{
If(baseX!=0)getBackground().drawImage(bg... baseX-bgiwidth,0);
If(baseX<getwidth())getBackground().draw...
}
}
when it gets to the part that says "Public void act ()" it gives be a class, interface or enum expected error. What is wrong with the code? what do i need to change? thanks! =)

