We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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
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?
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?
I guess then that you want an
if
instead of afor
keyword. See the Reference page for these words. And in anif
, you have to use the comparison operator==
, not the assignment=
one.