Error Code Left was not declared

This code was working, then I tried to get clever and make some changes, in a fit of stupidity I didn’t save as before making changes.

I think I have removed the changes but now I get the following error messages:

"Arduino: 1.8.2 (Windows 10), Board: “Arduino/Genuino Uno”

C:\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Arduino\hardware -tools C:\Arduino\tools-builder -tools C:\Arduino\hardware\tools\avr -built-in-libraries C:\Arduino\libraries -libraries C:\Users\Mum and Dads\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10802 -build-path C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723 -warnings=none -build-cache C:\Users\MUMAND~1\AppData\Local\Temp\arduino_cache_603672 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Arduino\hardware\tools\avr -verbose C:\Users\Mum and Dads\Documents\Arduino\Up_Down\Up_Down.ino
C:\Arduino\arduino-builder -compile -logger=machine -hardware C:\Arduino\hardware -tools C:\Arduino\tools-builder -tools C:\Arduino\hardware\tools\avr -built-in-libraries C:\Arduino\libraries -libraries C:\Users\Mum and Dads\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10802 -build-path C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723 -warnings=none -build-cache C:\Users\MUMAND~1\AppData\Local\Temp\arduino_cache_603672 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Arduino\hardware\tools\avr -verbose C:\Users\Mum and Dads\Documents\Arduino\Up_Down\Up_Down.ino
Using board ‘uno’ from platform in folder: C:\Arduino\hardware\arduino\avr
Using core ‘arduino’ from platform in folder: C:\Arduino\hardware\arduino\avr
Detecting libraries used…
“C:\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Arduino\hardware\arduino\avr\variants\standard” “C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723\sketch\Up_Down.ino.cpp” -o “nul”
Generating function prototypes…
“C:\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Arduino\hardware\arduino\avr\variants\standard” “C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723\sketch\Up_Down.ino.cpp” -o “C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723\preproc\ctags_target_for_gcc_minus_e.cpp”
“C:\Arduino\tools-builder\ctags\5.8-arduino11/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723\preproc\ctags_target_for_gcc_minus_e.cpp”
Compiling sketch…
“C:\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Arduino\hardware\arduino\avr\variants\standard” “C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723\sketch\Up_Down.ino.cpp” -o “C:\Users\MUMAND~1\AppData\Local\Temp\arduino_build_903723\sketch\Up_Down.ino.cpp.o”
C:\Users\Mum and Dads\Documents\Arduino\Up_Down\Up_Down.ino: In function ‘void loop()’:

Up_Down:34: error: ‘Left’ was not declared in this scope

Left_buttonState = digitalRead(Left _button); // read the state of the pushbutton value:

^

Up_Down:43: error: ‘Right’ was not declared in this scope

Right_buttonState = digitalRead(Right _button); // read the state of the pushbutton value:

^

exit status 1
‘Left’ was not declared in this scope"

const byte Left_button = 4;     // the number of the Left pushbutton pin
const byte Up_button = 5;     // the number of the Up pushbutton pin
const byte Down_button = 6;     // the number of the Down pushbutton pin
const byte Right_button = 7;     // the number of the Right pushbutton pin

const byte Green_led = 8;      // the number of the Green LED pin
const byte Yellow_led = 9;      // the number of the Yellow LED pin
const byte Red_led = 10;      // the number of the Red LED pin

// variables will change:
byte Left_buttonState = 0;         // variable for reading the pushbutton status
byte Up_buttonState = 0;         // variable for reading the pushbutton status
byte Down_buttonState = 0;         // variable for reading the pushbutton status
byte Right_buttonState = 0;         // variable for reading the pushbutton status

void setup() {

  pinMode(Left_button, INPUT_PULLUP);    // initialize the pushbutton pin as an input:
  pinMode(Up_button, INPUT_PULLUP);    // initialize the pushbutton pin as an input:
  pinMode(Down_button, INPUT_PULLUP);    // initialize the pushbutton pin as an input:
  pinMode(Right_button, INPUT_PULLUP);    // initialize the pushbutton pin as an input:

  pinMode(Green_led, OUTPUT);    // initialize the LED pin as an output:
  pinMode(Yellow_led, OUTPUT);    // initialize the LED pin as an output:
  pinMode(Red_led, OUTPUT);    // initialize the LED pin as an output:

}

void loop() {

  Left_buttonState = digitalRead(Left _button);    // read the state of the pushbutton value:
  // check if the pushbutton is pressed.
  // if it is, the buttonState is LOW:
  if (Left_buttonState == LOW) {    // turn LED on:
    digitalWrite(Red_led, HIGH);
  } else
  { // turn LED off:
    digitalWrite(Red_led, LOW);
  }

  Right_buttonState = digitalRead(Right _button);    // read the state of the pushbutton value:

  if (Right_buttonState == LOW) {    // turn LED on:
    digitalWrite(Green_led, HIGH);
  }
  else {    // turn LED off:
    digitalWrite(Green_led, LOW);
  }
}

Please use code tags for error/warning messages as well as code.

You have a space in the variable name. See:

Kiwi_Bloke: const byte Right_button = 7;    // the number of the Right pushbutton pin

vs.

Kiwi_Bloke:   Right_buttonState = digitalRead(Right _button);    // read the state of the pushbutton value:

'Left _button'

There is a space character between 't' and '_'

Left_buttonState = digitalRead(Left _button); // read the state of the pushbutton value:

Thanks for the quick response, its late here and no matter how many times I read that I just didn't see the space.

Thanks also for the information on the error code in tags I will remember that for future use.

And it works again, thanks for the eagle eyes