ok but still having the setlocation error


int boost = Greenfoot.isKeyDown("s") ? 9 : 0;
else if (dir == 0 && animSet != standleftAnim) setAnim(standleftAnim, 2);
if (dir == -1 && animSet != leftAnim) setAnim(leftAnim, 6); else if (dir == 1 && animSet != rightAnim) setAnim(rightAnim, 6); else if (dir == 0 && animSet != standLeftAnim && animSet != standRightAnim) setAnim(animSet == leftAnim ? standLeftAnim : standRightAnim, 2);