(newY+under.getY()-(under.getImage().getHeight()/2)-((getImage().getHeight()/2))-1;)
-1 is not a statement. following a guide and work for him? (line 17)
public boolean onGround()
{
Ground under = null;
int counter = 1;
int max = vSpeed;
//int variance
while (counter <=max&&under==null)
{
under=(Ground)getOneObjectAtOffset(0,getimage().getHeight()/2+counter,Ground.class);
counter ++;
}
// If there is a platform, correct Player's height so that he always lands right on the platform
// This avoids a wierd floating effect that was present otherwise
if(under !=null)
{
int newY;
newY+under.getY()-(under.getImage().getHeight()/2)-((getImage().getHeight()/2))-1;
setLocation(getX(),newY);
}
return under!= null;
}