HELP ME ( was not declared in this scope)

i have a problem
Serial.println(“MANUAL MODE”);
if ((rev_pb == 1 && forw_pb == 1) && (diff1 <= error && diff2 <= error))
{
Palong_Uling();
}

if (rev_pb == 0 && forw_pb == 1)
{
Abante_Uling(1000);// HERE
it says it was not declared in the scope, when i clearly declared it after this void loop() PLES HELP
i wonder if my code is showed i definitely attached it.

edit(finally found how to post code)

int forw_pb;
int rev_pb;
int m_a;
int LDR1;
int LDR2;
int F_pin = 8;
int R_pin = 9;
int F_but = 2;
int R_but = 3;
int m_abut = 4;
int error = 5;

void setup() 
{
pinMode(F_pin, OUTPUT);
pinMode(R_pin, OUTPUT);
pinMode(F_but, INPUT);
pinMode(R_but, INPUT);
pinMode(m_abut, INPUT);
}

void loop() 
{
  LDR1 = analogRead(A1);
  LDR2 = analogRead(A2);
  rev_pb = digitalRead(R_but);
  forw_pb = digitalRead(F_but);
  m_a = digitalRead(m_abut);
  int diff1 = (LDR1 - LDR2);
  int diff2 = (LDR2 - LDR1);
  Uling_Correction(100); //assume labaw ug 100 ang ldr 2
  Serial.println("LDR1 = ");
  Serial.println(LDR1);
  Serial.println("\t");
  Serial.println("LDR2 = ");
  Serial.println(LDR2);
  if (m_a==1)
  {
    Serial.println("AUTO MODE");
    if ((rev_pb == 1 && forw_pb == 1) && (diff1 <= error && diff2 <= error))
    {
      Palong_Uling();
    }
    if ((LDR1 > LDR2) && (LDR1 >= 1 && LDR1 <= 100))
    {
      Abante_Uling(1000);
      delay(1000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 101 && LDR1 <= 200))
    {
      Abante_Uling(2000);
      delay(2000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 201 && LDR1 <= 300))
    {
      Abante_Uling(3000);
      delay(3000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 301 && LDR1 <= 400))
    {
      Abante_Uling(4000);
      delay(4000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 401 && LDR1 <= 500))
    {
      Abante_Uling(5000);
      delay(5000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 501 && LDR1 <= 600))
    {
      Abante_Uling(6000);
      delay(6000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 601 && LDR1 <= 700))
    {
      Abante_Uling(7000);
      delay(7000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 701 && LDR1 <= 800))
    {
      Abante_Uling(8000);
      delay(8000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 801 && LDR1 <= 900))
    {
      Abante_Uling(9000);
      delay(9000);
      Palong_Uling();
    }
     if ((LDR1 > LDR2) && (LDR1 >= 901 && LDR1 <= 1023))
    {
      Abante_Uling(10000);
      delay(10000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 1 && LDR2 <= 100))
    {
      Atras_Uling(1000);
      delay(1000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 101 && LDR2 <= 200))
    {
      Atras_Uling(2000);
      delay(2000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 201 && LDR2 <= 300))
    {
      Atras_Uling(3000);
      delay(3000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 301 && LDR2 <= 400))
    {
      Atras_Uling(4000);
      delay(4000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 401 && LDR2 <= 500))
    {
      Atras_Uling(5000);
      delay(5000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 501 && LDR2 <= 600))
    {
      Atras_Uling(6000);
      delay(6000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 601 && LDR2 <= 700))
    {
      Atras_Uling(7000);
      delay(7000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 701 && LDR2 <= 800))
    {
      Atras_Uling(8000);
      delay(8000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 801 && LDR2 <= 900))
    {
      Atras_Uling(9000);
      delay(9000);
      Palong_Uling();
    }
     if ((LDR1 < LDR2) && (LDR2 >= 901 && LDR2 <= 1023))
    {
      Atras_Uling(10000);
      delay(10000);
      Palong_Uling();
    }
    delay (1000);
  }

  if (m_a == 0)
  {
   Serial.println("MANUAL MODE");
    if ((rev_pb == 1 && forw_pb == 1) && (diff1 <= error && diff2 <= error))
    {
      Palong_Uling();
    }
   
   if (rev_pb == 0 && forw_pb == 1)
   {
    Abante_Uling(1000);
   }
   if (forw_pb == 1 && rev_pb == 0)
   {
    Atras_Uling(1000);
   }
   delay(1000);
  } 
}

void Abante_Uling(int DP);
{
  digitalWrite(F_pin, HIGH);
  digitalWrite(R_pin, LOW);
  delay(DP);
}
void Atras_Uling(int PP);
{
  digitalWrite(F_pin, HIGH);
  digitalWrite(R_pin, LOW);
  delay(PP);
}
void Palong_Uling()
{
  digitalWrite(F_pin, LOW);
  digitalWrite(R_pin, LOW);
  delay(50);
}
void Uling_Correction(int minus)
{
  LDR2 = LDR2 - minus;
}

sketch_may06a.ino (4.15 KB)

You have some extra ;'s that need removing.

void Abante_Uling(int DP); <<<<<<<<<<<<<<<<<<< here
{
  digitalWrite(F_pin, HIGH);
  digitalWrite(R_pin, LOW);
  delay(DP);
}
void Atras_Uling(int PP); <<<<<<<<<<<<<<<<<<< and here
{
  digitalWrite(F_pin, HIGH);
  digitalWrite(R_pin, LOW);
  delay(PP);
}
void Palong_Uling() <<<<<<<<<<<<<<<<<<< but not here
{
  digitalWrite(F_pin, LOW);
  digitalWrite(R_pin, LOW);
  delay(50);
}

THANK YOU SO MUCH, I DON’T KNOW HOW DID I MISS SUCH A SIMPLE MISTAKE.

kafor1:
THANK YOU SO MUCH, I DON'T KNOW HOW DID I MISS SUCH A SIMPLE MISTAKE.

Proves you're a human :wink: