invalid AssignmentOperator

Discussion in 'Plugin Development' started by zachman, Jul 25, 2013.

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

    zachman

    Code:java
    1. public void circleMidpoint(int xCenter, int yCenter, int radius, int y, int blockType, Player player)
    2. {
    3. int x = 0;
    4. int z = radius;
    5. int p = (5 - radius * 4) / 4;
    6. if (z == 2)
    7. p--;
    8. for (int i = z; i >= 0; i--)
    9. placePoints(xCenter, yCenter, x, i, y, blockType, player);
    10. int i;
    11. for (; x < z;
    12. i >= 0) // ERROR Here Syntax error on token ">=", invalid AssignmentOperator
    13. {
    14. x++;
    15. if (p < 0) {
    16. p += 2 * x + 1;
    17. } else {
    18. z--;
    19. p += 2 * (x - z) + 1;
    20. }
    21. i = z; continue;
    22. placePoints(xCenter, yCenter, x, i, y, blockType, player);
    23.  
    24. i--;
    25. }
    26. }


    Please help me >.< I have no clue whats wrong >.<
     
  2. Offline

    Firefly

    Your for loop is incorrect... What are you trying to achieve?
     
  3. Offline

    zachman

  4. Offline

    Firefly

    Well you for loop is wrong. You need something like for (int i = 0 ; i < 5 ; i++)

    Right now you have a random ; at the start.

    You also need to assign a value to i somewhere.
     
  5. Offline

    zachman

    Alright thanks for the help, but I think I'm dumb sometimes... Eclipse is telling me to rename that i to something else...
     
Thread Status:
Not open for further replies.

Share This Page