Well error is quite self explanatory isn't it ?
what you expect to get back is String, int, int
and you only 'supply' String
try this
public void malePunkte() {
GreenfootImage img = new GreenfootImage();
img.drawString(getPunkte(), 50, 10);
}
ps. on return statement you do not need to surround with bracket the variable you want to return. Just do
return stringpunkte
ps. i have no idea what the GreenfootImage is ;)
edit: According to helpful link provided by - Gyro Gearless
www.greenfoot.org/files/javadoc/greenfoot/GreenfootImage.html
drawImage(GreenfootImage image, int x, int y)
Draws the given Image onto this image
and
GreenfootImage(int width, int height)
Create an empty (transparent) image with the specified size.
As you can see drawImage draws on top of the created 'empty' image. So as Constructor argument you can specify the size of empty image, and as to a method you can specify the size of the new image that will go on top of the empty one