Hello
I got a problem...
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class Anzeige extends Actor
{
public Anzeige(String text)
{
GreenfootImage Anz = new GreenfootImage (text.length()*20, 30);
Anz.drawString (text, 2, 20);
setImage (Anz); //Man legt "Anz" als Bild für die Klasse "Anzeige" fest.
}
pubilc void setText(String text)
{
GreenfootImage Anz = getImage();
Anz.clear();
Anz.drawString (text, 2, 20);
}
}
It says:
<indentifier> expected ( at the line "pubilc void setText(String text)" )
The text is in another class.
I dont know why, i saw an example which almost the same code which worked...
What did i do wrong?

