lvalue required as left operand of assignment

So i’m a student and i’m trying to make a servo motor with different delays and i tried to start it but a err appeared and i don’t know how to solve it

sketch_nov28a.ino (544 Bytes)

OP’s code posted by someone who actually read “How to use this forum - Please read”

#include <Servo.h> 

Servo servo;
int hoek = 0;     // een hoek gewoon als be,aming starten
int teller = 0;   //Teller die start ^op 0
int tto = 0;      //TijdTussenOntsteking

void setup () 
{
 servo.attach(9); 
}

void loop () 
{
  for (hoek = 0; hoek <= 45; hoek++) 
  {
  servo.write(90);
  delay(tto);
  }
    for (hoek = 45; hoek >=0; hoek--) 
    {
    servo.write(hoek); 
    delay(10); 
    }
      if (hoek = 45) 
     {
      teller + 1 = teller;  
     }
        if (teller = 2) 
        {
        tto = 70; 
        }
       
}

Maybe post the actual error - the complete error.

if (hoek = 45)

Oops. See trap #3.

teller + 1 = teller;

Don't you have that backwards?

if (hoek = 45)
if (teller = 2)

Even after correcting this

if (hoek = 45)

what are the chances that will ever be true after this?

 for (hoek = 45; hoek >= 0; hoek--)