Servo motor

Hello there ! Im new to Arduino and Im learning about servo, I have a small problem with the coding that I cannot understand.

My code are shown below:

#include <Servo.h>
Servo myservo1;

int angle(0);

// create servo object to control a servo
// twelve servo objects can be created on most boards

void setup() {
myservo1.attach(5);
myservo1.write(angle);
delay(50);
}

void loop ()
{
for(angle = 0; angle 45; angle++) im having problem here, it says that 'exit status 1, expected ‘;’, before numeric constant

{

myservo1.write(angle);
delay(50);
}

for(angle = 45; angle > 0; angle–)

{

myservo1.write(angle);
delay(50);

}

}

Thank you for your time and have a nice day ahead !!

"angle 45" doesn't mean anything.

Steve

Whereas

angle < 45

is an expression returning a truth value, no doubt what you meant.

You should enable verbose compiler output and look at the full set of error and warning messages if you
have a problem like this,