i have this code
public player()
{
GreenfootImage myImage = getImage();
int myNewHeight = (int)myImage.getHeight()*3/10;
int myNewWidth = (int)myImage.getWidth()*3/10;
myImage.scale(myNewWidth, myNewHeight);
}
but i want the "player()" (or whatever it's called) to be applicable on an image
i tried
public GreenfootImage playerup()
{
GreenfootImage myImage = getImage();
int myNewHeight = (int)myImage.getHeight()*3/10;
int myNewWidth = (int)myImage.getWidth()*3/10;
myImage.scale(myNewWidth, myNewHeight);
}
(playerup is the image) but i already have a GreenfootImage playerup = new GreenfootImage("playerupside.png"); at the top of my code
but it keeps saying that it is missing return statement