unexpected token count

idkidk
edited April 2014 in Questions about Code

hi everyone, first time poster i have an error(s) in my code. i cannot seem to find the error it will be appreciated if you guys can help me

the line for (count=1){ doesn't work

my code is below

    for (int count=0; x < height/5; count++){
        for (count=1){
           ellipse (x, y, 5, 5);
        }
    } 

thanks for the help

Answers

  • edited April 2014 Answer ✓

    That is not correct syntax for a for loop. Just compare your second for loop to your first, or check out the Processing reference: http://www.processing.org/reference/for.html

    What exactly are you trying to do?

  • idkidk
    edited April 2014

    draw a bubble for a moving fish.

    and thx

  • I meant, what are you trying to do with that for loop?

  • draw 1 bubble when count = 1

  • You aren't really providing any information for us to work with. What do you want to do when the count is 2? Why is this inside a for loop that will execute entirely within a single frame?

  • Answer ✓

    I guess then that you want an if instead of a for keyword. See the Reference page for these words. And in an if, you have to use the comparison operator ==, not the assignment = one.

Sign In or Register to comment.