This site requires JavaScript, please enable it in your browser!
Greenfoot back
Hutanoi
Hutanoi wrote ...

2014/6/2

<indentifier> expected...

Hutanoi Hutanoi

2014/6/2

#
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?
davmac davmac

2014/6/2

#
You spelt 'public' wrong (and also 'identifier').
Hutanoi Hutanoi

2014/6/2

#
omg, i knew it, such an simple mistake :) thank you very much :D (Y)
You need to login to post a reply.