Keep appearing missing operator, semicolon or} near waveCircle

hi everyone, as the title says, an error will appear everytime i want to run the coding, ut i checked several times and cant find the problem, please help me…

float step=TWO_PI/10;
float t=0;

void setup()
{
size(400,400);
background(10,10,10);
frameRate(30);
}

void draw()
{
fill(0);
noStroke();
rect(0,0,width,height);

int cycleLength=200;
float n=t%cycleLength;
if(n>cycleLength/2){
n= cycleLength-n;
{
float m=n/60+1;
noFill();
for (int i=0; i<20; i++)
{
stroke(255-m120, 20+i10, m120);
strokeWeight(3+i/5);
waveCircle(100-i
5, 250-i5, m(i+1)/8);
}
t++;
}
void waveCircle(int size, int twist, float t)
{
beginShape();
for(float theta=0; theta<=TWO_PI+3step; theta+=step)
{
float r1,r2;
r1=cos(theta)+1;
r2=sin(theta)+1;
float r=size+noise(r1, r2, t)twist;
float x=width/2+r
cos(theta);
float y=height/2+r
sin(theta);
curveVertex(x,y);
}
endShape();
}

Edit/AutoFormat your code and you will see that you are missing a couple of closing braces at the end of your draw() function. There are also multiple typos where you omit the asterisk when you want to multiply two numbers, eg should be i*10 not i10.

Addendum:
Even after you get it to run without error I doubt that you will see anything but a black screen. It will still need debugging. I found that

if(n>cycleLength/2){

was never true. By remming this line out and deleting the following ‘for’ loop I was able to get this output which may or may not be what you are trying to achieve.

1 Like