This site requires JavaScript, please enable it in your browser!
Greenfoot back
lupejimenez95
lupejimenez95 wrote ...

2016/2/16

Error in my pizza fatcat

lupejimenez95 lupejimenez95

2016/2/16

#
The code I have in greenfoot right now is ; int newX = Greenfoot.getRandomNumber(7) - 3; setLocation( getX()+ newX + getY() + speed); setRotation(getRotation() - 1); I keep getting an error for set Location, the reason it says for error is: actual and formal argument lists differ in length. What am I messing up in
danpost danpost

2016/2/16

#
The signature for the 'setLocation' method of the Actor class is: setLocation(int x, int y) As you can see, there are two arguments that are both of type 'int'. Your 'setLocation' statement given above only shows one argument, not two.
You need to login to post a reply.