robot lawnmower

i have made an arduino uno, L298N, sg90 stepper, and sr04 ultrasonic "eyes". I 3d printed all the parts and purchased most of the electronics from amazon, I actually have it working, but have a slight problem with the programming. when I go to upload the sketch, i get this error: "stop was not declared in this scope". here is my code. any help would be much appreciated.

#include <Servo.h> //Servo motor library. This is standard library
#include <NewPing.h> //Ultrasonic sensor function library. You must install this library

//our L298N control pins
const int LeftMotorForward = 3;
const int LeftMotorBackward = 2;
const int RightMotorForward = 4;
const int RightMotorBackward = 5;

const int ENA = 6;
const int ENB = 9;

//sensor pins
#define trig_pin A1 //analog input 1
#define echo_pin A2 //analog input 2

#define maximum_distance 100
boolean goesForward = false;
int distance = 30;

NewPing sonar(trig_pin, echo_pin, maximum_distance); //sensor function
Servo servo_motor; //our servo name

void setup()
{
pinMode(RightMotorForward, OUTPUT);
pinMode(LeftMotorForward, OUTPUT);
pinMode(LeftMotorBackward, OUTPUT);
pinMode(RightMotorBackward, OUTPUT);
pinMode (ENA, OUTPUT);
pinMode (ENB, OUTPUT);

{
servo_motor.attach(10); //our servo pin
{
servo_motor.write(115);
delay(2000);
distance = sonar.ping_in();
delay(100);
distance = sonar.ping();
delay(30);
distance = sonar.ping();
delay(100);
distance = sonar.ping();
delay(100);
}

void loop();

{
analogWrite (ENA, 255);
analogWrite (ENB, 255);

int distanceRight = 0;
int distanceLeft = 0;
delay(500);

if (distance <= 20);
stop();
delay(5000);
moveBackward();
delay(5000);
turnRight();
delay(5000);
distanceRight - lookRight();
distanceLeft = lookLeft();

if (distance >= (50);
moveForward();
}

distanceRight = lookRight();
delay(500);
distanceLeft = lookLeft();
delay(500);

if (distance >= distanceLeft) {
moveBackward();
delay(500);
turnRight();

}
else {
moveBackward();
delay(500);
turnLeft();

}
}
else {
moveForward();
}
{
int distance = newPing();
}

{ int lookRight()
servo_motor.write(115);
delay(500);
int distance = readPing();
delay(500);
servo_motor.write(115);
return distance;
}

{ int lookLeft()
servo_motor.write(115);
delay(500);
int distance = readPing();
delay(500);
servo_motor.write(115);
return distance;
delay(500);
}

_int readPing()
delay(100);
int cm = sonar.ping_cm();
if (cm == 0) {
cm = 50;
}
return cm;
}

{ void Stop()

Stop = true;

digitalWrite(RightMotorForward, LOW);
digitalWrite(LeftMotorForward, LOW);
digitalWrite(RightMotorBackward, LOW);
digitalWrite(LeftMotorBackward, LOW);
}

{ void moveForward()

moveForward = true;

digitalWrite(LeftMotorForward, HIGH);
digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorBackward, LOW);
digitalWrite(RightMotorBackward, LOW);
}
}

{ void moveBackward()

moveBackward = true;

digitalWrite(LeftMotorBackward, HIGH);
digitalWrite(RightMotorBackward, HIGH);

digitalWrite(LeftMotorForward, LOW);
digitalWrite(RightMotorForward, LOW);

}

{ void turnRight()

digitalWrite(LeftMotorForward, HIGH);
digitalWrite(RightMotorBackward, HIGH);

digitalWrite(LeftMotorBackward, LOW);
digitalWrite(RightMotorForward, LOW);

delay(4000);

digitalWrite(LeftMotorForward, HIGH);
digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorBackward, LOW);
digitalWrite(RightMotorBackward, LOW);

}

{ void turnLeft()

digitalWrite(LeftMotorBackward, HIGH);
digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorForward, LOW);
digitalWrite(RightMotorBackward, LOW);

delay(4000);

digitalWrite(LeftMotorForward, HIGH);
digitalWrite(RightMotorForward, HIGH);

digitalWrite(LeftMotorBackward, LOW);
digitalWrite(RightMotorBackward, LOW);
}

What was the line number given for the error?

Paul

You have "Stop" and "stop". which is correct?

All through your code, you have illegal or improperly formed syntax. You can't get away with that in any programming language. Mainly you have badly misplaced, extraneous or missing braces {}. Too many to just point at one.

Please edit your post to add code tags, as described in the "How to use the forum" post at the head of every topic.

This is nonsense:

{ void Stop()

  Stop = true;

  digitalWrite(RightMotorForward, LOW);
  digitalWrite(LeftMotorForward, LOW);
  digitalWrite(RightMotorBackward, LOW);
  digitalWrite(LeftMotorBackward, LOW);
}

You said you had it working? In what way

if (distance <= 20);Oops

Please remember to use code tags when posting code.