Error due to error from expected initializer

When I try to compile the following code into the Arduino I get error “expected initializer before void” how can I get the code to work?

#define leftVel 10
#define rightVel 5
#define In1 9
#define In2 8
#define In3 7
#define In4 6
int trigger_front = A4;
int echo_front = A5; // front
int trigger_right = A2;// right
int echo_right = A3;// rt
int trigger_left = A0;
int echo_left = A1;
int delayTime;
int collision = 20;
long int Fdistance, Ldistance, Rdistance, Ftime, Ltime, Rtime;

void setup() {
// put your setup code here, to run once:
pinMode(leftVel, OUTPUT);
pinMode(rightVel, OUTPUT);
pinMode(In1, OUTPUT);
pinMode(In2, OUTPUT);
pinMode(In3, OUTPUT);
pinMode(In4, OUTPUT);
pinMode(trigger_front, OUTPUT);
pinMode(echo_front, INPUT);
pinMode(trigger_right, OUTPUT);
pinMode(echo_right, INPUT);
pinMode(trigger_left, OUTPUT);
pinMode(echo_left, INPUT);

}
//-----------------------------------------------------------------------------
// FUNCTION TO MOVE FOWARD
//-----------------------------------------------------------------------------
void stright()
{
digitalWrite(In1, HIGH);
digitalWrite(In2, LOW);
analogWrite(leftVel, 200);
digitalWrite(In3, HIGH);
digitalWrite(In4, LOW);
analogWrite(rightVel, 200);
}
//-----------------------------------------------------------------------------
// FUNCTION TO GO LEFT
//-----------------------------------------------------------------------------

void left()
{
digitalWrite(In1, HIGH);
digitalWrite(In2, LOW);
analogWrite(leftVel, 200);
digitalWrite(In3, LOW);
digitalWrite(In4, HIGH);
analogWrite(rightVel, 200);
}
//-----------------------------------------------------------------------------
// FUNCTION TO GO RIGHT
//-----------------------------------------------------------------------------
void right()
{
digitalWrite(In1, LOW);
digitalWrite(In2, HIGH);
analogWrite(leftVel, 200);
digitalWrite(In3, HIGH);
digitalWrite(In4, LOW);
analogWrite(rightVel, 200);
}
//-----------------------------------------------------------------------------
// FUNCTION TO STOP
//-----------------------------------------------------------------------------
void halt()
{
digitalWrite(In1, LOW);
digitalWrite(In2, LOW);
analogWrite(leftVel, 0);
digitalWrite(In3, LOW);
digitalWrite(In4, LOW);
analogWrite(rightVel, 0);
}
//-----------------------------------------------------------------------------
// FUNCTION TO TURN VEHICLES AROUND
//-----------------------------------------------------------------------------
void turnAround()
{
left();
delay(100);
}

//-----------------------------------------------------------------------------
// FUNCTION TO COMPARE DISTANCES AND TAKE NECESSARY ACTION
//-----------------------------------------------------------------------------
void compareDistance() // find the longest distance
{
if (Ldistance>Rdistance) //if left is less obstructed
{
left();
}
else if (Rdistance>Ldistance) //if right is less obstructed
{
right();
}
else //if they are equally obstructed
{
turnAround();
}
}

void changeDirection ()
{

halt();
compareDistance();

}

void loop() {
// put your main code here, to run repeatedly:
//-----------------------------------------------------------------------------
//Step 1 - //to calculate the respective distances to the front left and right
//-----------------------------------------------------------------------------

        digitalWrite(trigger_front, LOW);
        delayMicroseconds(2);
        digitalWrite(trigger_front, HIGH);
        delayMicroseconds(5);
        digitalWrite(trigger_front, LOW);
        Ftime = pulseIn(echo_front, HIGH);
        Fdistance = Ftime/29/2;
        digitalWrite(trigger_right, LOW);
        delayMicroseconds(2);
        digitalWrite(trigger_right, HIGH);
        delayMicroseconds(5);
        digitalWrite(trigger_right, LOW);
        Rtime = pulseIn(echo_right, HIGH);
        Rdistance = Rtime/29/2;
        digitalWrite(trigger_left, LOW);
        delayMicroseconds(2);
        digitalWrite(trigger_left, HIGH);
        delayMicroseconds(5);
        digitalWrite(trigger_left, LOW);
        Ltime = pulseIn(echo_left, HIGH);
        Ldistance = Ltime/29/2;

//-----------------------------------------------------------------------------
//Step 2 - decesions
//-----------------------------------------------------------------------------

if (Fdistance <= collision) {changeDirection();}
else stright();
delay(1000);
}

It would really be helpful if you would provide more information. The compiler gives a LOT of information that you aren’t sharing.
It would REALLY help to know what line number the error happens on.
You can copy and paste the compiler output.

After a LOT of unnecessary work, I managed to copy and paste your code into the Arduino IDE.
It compiled just fine.

Thanks old guy

Did you get it to compile?
Dig you get it to work?

Oldguy the code is compiling fine now but the robotic car is not working as planned

Motors are not working with the information from the ultrasonic sensors

Please I need ur help because the competition is fast approaching

As I and others have said, you need to provide details. You need to explain your hardware EXACTLY and describe what it and the softwre are supposed to do and how they work together. Then describe what IS and what IS NOT working. Describe what it is doing wrong and what it is supposed to be doing instead. Be specific. Debugging code isn’t easy. Debugging someone else’s code is harder. Debugging someone else’s code when you don’t have any idea what it is supposed to do is effectively impossible.

Am using three ultrasonic sensors to provide direction for the motors(front, left and right).
The motors are to turn to the direction with less obstruction(greater distance).

All three sensors (at the front, right and left) are to work at the same time to decide which way should the motors turn to: either left right or forward.
Now the problem is that only two of the three ultrasonic sensors are working at a time(front and left US sensor) while right US sensor is not working during the process. Do u still need more information on how the sensors work giving direction to motors