Solved False error in Eclipse?

Discussion in 'Plugin Development' started by MCnumi, Jul 5, 2016.

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

    MCnumi

    So I am getting this error:

    Syntax error on token ")", ; expected after this token

    but the wierd thing is, this is on the line of my for loop.. here is the code:
    Code:
    PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.SPELL_WITCH, true, (float) damagerLoc.getX(), (float) damagerLoc.getY(), (float) damagerLoc.getZ(), 0, 0, 0, 0, 2, null);         
             
                                    for (Player p; damagerLoc.getChunk().getEntities()) {
                                        ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
                                    }
    the error is on the line with damagerLoc.getChunk().getEntities() on the last closing parenthesis.
    got any idea?

    EDIT: nevermind, I'm just very, very stupid.
     
    Last edited: Jul 5, 2016
  2. Offline

    Zombie_Striker

    @MCnumi
    For loops follow the format "for(Object variable : Collection)". replace the semicolon with a colon.
     
  3. Offline

    MCnumi

    Ik, i just derped out a little... a lot..
     
  4. Offline

    Tecno_Wizard

    @MCnumi, please mark this as solved.
     
Thread Status:
Not open for further replies.

Share This Page