What is wrong with my code?
It's a for loop that is meant to put obstacle actors (that have the image grass.png) on the top of the world. "x" is the x coordinate. I compiled the code and it says that it can't find the variables x, world, and grass. Sorry if it is confusing.
for (x = 60; x <= world.getwidth() - grass.getwidth(); x = x + 40) { Obstacle border = new Obstacle(); border.setImage("grass.png"); addObject(border,x,60); }