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

2013/4/26

Error message

infant17 infant17

2013/4/26

#
Im getting an error message stating not a statement and I cant figure out why. If I delete one of the 3 lines and compile everything is ok but not when there is 3 lines to meet the requirements asked for. Any suggestions would be greatly appreciated. This is what I have so far: /** * Sceanario stops once it reaches 0 crab, 0 worm, and 0 lobster. * */ public void act() { if (getObjects(Crab.class).size() == 0 || getObjects(Worm.class).size() == 0) getObjects(Lobster.class).size() == 0) Greenfoot.stop(); }
danpost danpost

2013/4/26

#
You are missing the operator between the second and third conditions (see between the first and second). In fact, the third condition is not even within the condition area of the 'if' statement (there are un-matching parenthesis).
infant17 infant17

2013/4/26

#
Thank you
You need to login to post a reply.