Missing Parenthesis
in
Programming Questions
•
1 year ago
Hi guys,
I am trying to make my creature have multiple arms, but every time I run it I keep getting an error that says "maybe missing right parenthesis?" I tried to fix it, and even rewrote my code. If anyone can take a look at my code and quickly point out my error that would be great! The problem is happening in void draw window. ==>
if ((x > width)i(x < 0)){
Thanks again!!
int x=100;
int y=100;
int w=60;
int h=60;
int eyeSize=16;
int pupil=8;
int speed=1;
void setup() {
size (400, 400);
smooth ();
}
void draw () {
x=x+speed;
if ((x > width)i(x < 0)){
speed = speed *-1;
}
background (255); // white background
ellipseMode (CENTER);
rectMode (CENTER);
for (int i = y+5; i<y+h;i+=10);
{
stroke(0);
line(x-w/3, i, x+w/3, i);
}
fill (239, 255, 20); //yellow body
ellipse(x, y, w/6, h*2); // HEAD
fill(255); // white
ellipse (x-w/3, y-h/2, eyeSize, eyeSize); // left eye
fill (255); //white
ellipse (x+3, w/3, y-h/2, eyeSize, eyeSize); // right eye
line (x-w/12, y+h, x-w/4, y+h+10); // left arm
line (x+w/12, y+h, x-w/4, y+h+10); // right arm
fill(0); //black
ellipse (x-w/2, y-h/1, pupil, pupil); // left pupil
fill (0); //black
ellipse ( x+w/2, y-h/1, pupil, pupil); // right pupil
fill (142, 255, 228);// blue
ellipse (100, 140, 75, 70); // belly
line (80, 97, 120, 97); // mouth
fill (255, 36, 102);
stroke (252, 13, 33);
line (40, 40, 160, 40); // flat line for hat
rect(68, 10, 65, 30); // hat
}
}
1