"void"is not allowed error for"Time:"
add also null for add score
private static final Color TEXT_COLOR = new Color(200, 0, 0);
private static final Color TRANSPARENT_COLOR = new Color(0, 0, 0, 0);
public ScoreCounter(){
updateImage();
}
public void act() {
updateImage();
//this keeps updating the score counter;
}
private void updateImage()
{
String text = "Time: " + ((Background) getWorld()).countScore();
GreenfootImage image = new GreenfootImage(text, 20, TEXT_COLOR,TRANSPARENT_COLOR);
setImage(image);
}public void countPop()
{
s.add(20);
}
public void countScore()
{
s.getValue();
}int value = 0;
public Score()
{
}
public void add(int score)
{
value=value+score;
}
public int getScore()
{
return value;
}
}

