Please remove the last parenthesis from line 3.
import greenfoot.*;
public class Money extends Actor
{
private int holdX, holdY;
long markTime = 0;
int value;
public void act()
{
if (markTime == 0 && Greenfoot.mouseClicked(this))
{
holdX = getX();
holdY = getY();
if (value < 250) setLocation(517, 314); else setLocation (664, 367);
markTime = System.currentTimeMillis();
}
if (markTime != 0 && System.currentTimeMillis() - markTime > 1000)
{
markTime = 0;
credit();
setLocation(holdX, holdY);
}
}
private void credit()
{
((Screen) getWorld().getObjects(Screen.class).get(0)).addCredit(value);
}
}import greenfoot.*;
public class FiftyPence extends Money
{
public FiftyPence()
{
value = 50;
}
}