For Statement not working

I can’t seem to limit this to 25 ellipses even though I wrote a for statement.

float randomX;
float randomY;
float randomZ;
float randomQ;
int x;

void setup(){
  size(400,400);
  background(250,250,0);
   
}

void draw() {
randomX = random(width);
randomY = random(height);
randomZ = random(10,50);
randomQ = random(10,50);

    for(randomX=random(width); randomX<25; randomX++);

  fill(random(0,256), random(0,256), random(0,256));
  ellipse(randomX, randomY, randomZ, randomQ);
}
1 Like

Hello,

You have already highlighted the line that is the problem.

Some resources:

:)

1 Like