Functions not declaring inside scope

Hi, I’m having a bit of a trouble with my programming. I’m trying to declare my functions instead the loop but they don’t seem to be working and I can’t figure out what the problem is (Apologies I’m very new to Arduino) I am using different tabs for the forward, reverse and turn right and left. I’m currently working on a robot car and I’m trying to get it to go forward slowly for a few seconds then medium speed and then go forward quickly.

const int ENpinRight = 6;
const int pin1Y = 7;
const int pin2Y = 8;
const int ENpinLeft = 11;
const int pin3Y = 9;
const int pin4Y = 10;
const int LedLeftA = 12;
const int LedLeftB = 13;
const int LedRightA = 4;
const int LedRightB = 5;
const int LedC = 1;
const int LBumper = 0;
const int RBumper = 3;
 
void setup()
{
pinMode(LedLeftA, OUTPUT);
pinMode(LedLeftB, OUTPUT);
pinMode(LedRightA, OUTPUT);
pinMode(LedRightB,OUTPUT);
pinMode(LedC, OUTPUT);
pinMode(ENpinRight, OUTPUT);
pinMode(ENpinLeft,OUTPUT);
pinMode(pin1Y,OUTPUT);
pinMode(pin2Y,OUTPUT);
pinMode(pin3Y,OUTPUT);
pinMode(pin4Y,OUTPUT);

forward();

analogWrite(ENpinRight, 100);
analogWrite(ENpinLeft, 100);
delay (600);

analogWrite(ENpinRight, 175);
analogWrite(ENpinLeft, 175);
delay (600);

analogWrite(ENpinRight, 255);
analogWrite(ENpinLeft, 255);
delay (600);

}
void loop()
{
  while (digitalRead(LBumper) == LOW)
  
  for (int b = 0; b <= 2; b++)
  {
    reverse();
  }

  for (int tr = 0; tr <=4; tr++)
  {
    turn_right();
  }
    forward();
}

while (digitalRead(RBumper) == LOW){
  
  for (int b = 0; b <=2; b++)
  {
    reverse();
  }
  for (int t1 = 0; t1 <= 4; t1++)
  {
    turn_left();
  }
  forward();
}
}

These are in different tabs on the arduino that I’m using for forward, reverse, turn left and then turn right

void forward()
{
digitalWrite(ENpinRight,HIGH);
digitalWrite(ENpinLeft,HIGH);

digitalWrite(pin1Y,HIGH);
digitalWrite(pin2Y,LOW);
digitalWrite(pin3Y,HIGH);
digitalWrite(pin4Y,LOW);
 
digitalWrite(LedLeftA,HIGH);
digitalWrite(LedRightA,HIGH);
delay(100);
digitalWrite(LedLeftA,LOW);
digitalWrite(LedRightA,LOW);
digitalWrite(LedLeftB,HIGH);
digitalWrite(LedRightB,HIGH);
delay(100);
digitalWrite(LedLeftB,LOW);
digitalWrite(LedRightB,LOW);
digitalWrite(LedC,HIGH);
delay(100);
digitalWrite(LedC,LOW);
delay(100);
delay(2000);

}

void reverse()
{
digitalWrite(ENpinRight,LOW);
digitalWrite(ENpinLeft,HIGH);

digitalWrite(pin1Y,LOW);
digitalWrite(pin2Y,HIGH);
digitalWrite(pin3Y,LOW);
digitalWrite(pin4Y,HIGH);

digitalWrite(LedC,HIGH);
delay(100);
digitalWrite(LedC,LOW);
digitalWrite(LedLeftB,HIGH);
digitalWrite(LedRightB,HIGH);
delay(100);
digitalWrite(LedLeftB,LOW);
digitalWrite(LedRightB,LOW);
digitalWrite(LedLeftA,HIGH);
digitalWrite(LedRightA,HIGH);
delay(100);
digitalWrite(LedLeftA,LOW);
digitalWrite(LedRightA,LOW);
delay(100);

}

void turn_left()
{
 
  digitalWrite(ENpinRight,LOW);
  digitalWrite(ENpinLeft,HIGH);
  
  digitalWrite(LedRightA, HIGH);
  digitalWrite(LedRightB, HIGH);
  
  digitalWrite(pin1Y, HIGH);
  digitalWrite(pin2Y, LOW);
  digitalWrite(pin3Y, LOW);
  digitalWrite(pin4Y, HIGH);
  
  digitalWrite(LedRightA, LOW);
  digitalWrite(LedRightB, LOW);
}

void turn_right()
{
 digitalWrite(ENpinRight,HIGH);
 digitalWrite(ENpinLeft,LOW);
  
  digitalWrite(LedLeftA, HIGH);
  digitalWrite(LedLeftB, HIGH);
  
  digitalWrite(pin1Y, LOW);
  digitalWrite(pin2Y, HIGH);
  digitalWrite(pin3Y, HIGH);
  digitalWrite(pin4Y, LOW);
 
  digitalWrite(LedLeftA, LOW);
  digitalWrite(LedLeftB, LOW);
}

but they don't seem to be working

That really does not describe the problem at all. Are there errors? What happens when you run the code? How is that different from what should happen?

Karma for code tags on your first post. It is rare that new members bother to read the guidelines.

groundFungus:
That really does not describe the problem at all. Are there errors? What happens when you run the code? How is that different from what should happen?

Apologies here's the errors I am getting

Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: "Arduino Uno"

In function 'void setup()':

BasicDrill:29:1: error: 'forward' was not declared in this scope

 forward();

 ^~~~~~~

C:\Users: note: suggested alternative: 'fread'

 forward();

 ^~~~~~~

 fread

C:\Users\BasicDrill\BasicDrill.ino: In function 'void loop()':

BasicDrill:50:5: error: 'reverse' was not declared in this scope

     reverse();

     ^~~~~~~

BasicDrill:55:5: error: 'turn_right' was not declared in this scope

     turn_right();

     ^~~~~~~~~~

BasicDrill:57:5: error: 'forward' was not declared in this scope

     forward();

     ^~~~~~~

C:\Users\BasicDrill\BasicDrill.ino:57:5: note: suggested alternative: 'fread'

     forward();

     ^~~~~~~

     fread

C:\Users\BasicDrill\BasicDrill.ino: At global scope:

BasicDrill:60:1: error: expected unqualified-id before 'while'

 while (digitalRead(RBumper) == LOW){

 ^~~~~

BasicDrill:72:1: error: expected declaration before '}' token

 }

 ^

exit status 1
'forward' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Where does your loop() function end?

void loop()
{
   while (digitalRead(LBumper) == LOW)

      for (int b = 0; b <= 2; b++)
      {
         reverse();
      }

   for (int tr = 0; tr <= 4; tr++)
   {
      turn_right();
   }
   forward();

   //}  *********************  this bracket closed the loop() function so

   while (digitalRead(RBumper) == LOW)
   {

      for (int b = 0; b <= 2; b++)
      {
         reverse();
      }
      for (int t1 = 0; t1 <= 4; t1++)
      {
         turn_left();
      }
      forward();
   }
}

I commented out one misplaced curly bracket that closed the loop() function early. That left the rest of the code outside of a function. That left the rest of the code and the tabs is also out of place.

Use the autoformat (ctrl-t or Tools, Auto Format) function of the IDE, often. it will usually show misplaced and/or mismatched curly brackets and parenthesis.

Edit: on looking at the original post, it looks like it may have been autoformatted. The clue that there is a problem is the two brackets at the end are tight on top of each other:

  turn_left();
  }
  forward();
}
}

That should never happen.

And this while statement is right against the left margin, not indented. Another clue.

}

while (digitalRead(RBumper) == LOW){
 
  for (int b = 0; b <=2; b++)