Solved For Statement Problems

Discussion in 'Plugin Development' started by Build_and_Break, Jul 14, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Build_and_Break

    Hello, in my code found here for a pvp buff plugin, Eclipse highlights the closing parentheses on line 32 as shown below:

    Code:java
    1. event.getDamager().getNearbyEntities(5, 5, 5)


    It says it's an error (marks it with an x) and says: "Syntax error, insert "; ; ) Statement" to complete ForStatement".

    Do I have to fix it, or has Eclipse made a mistake? If I do, how?

    I've put things in the for statement and it doesn't change the error.

    Thanks in advance,
    Build
     
  2. Offline

    1Rogue

    You declared your for-each backwards. It should be:

    Code:java
    1. for (Entity e : event.getDamager().getNearbyEntities(5, 5, 5)) {


    Not the other way around.
     
  3. Offline

    Build_and_Break

    Okay, thanks!
     
Thread Status:
Not open for further replies.

Share This Page