"RMSVal" was not declared in this slope [SOLVED]

Variables defined inside a function are only available to that function. To make variables that can be used by more than one functions you would typically make then 'global' by defining them outside the functions.

Also it is a good idea to use the 'const' keyword with things like pin numbers. That way the compiler will complain if your code accidentally tries to change the value.

Also it is bad practice to use Pin 1 for I/O. That's one of the Serial I/O pins (0 and 1) and is very useful for debugging messages. Best not to use it unless you have no other choice (and don't need Serial I/O for anything).

const int RMSPin = 1;
const int RESPin = 4;
const int LMSPin = 2;
const int LESPin = 7;
const int LWPin = 3;
const int RWPin = 5;

int RMSVal = 0;
int RESVal = 0;
int LMSVal = 0;
int LESVal = 0;

void setup()
{
pinMode(RMSPin, INPUT);
pinMode(RESPin, INPUT);
pinMode(LMSPin, INPUT);
pinMode(LESPin, INPUT);
pinMode(LWPin, OUTPUT);
pinMode(RWPin, OUTPUT);
}

void loop()
{
RMSVal = digitalRead(RMSPIN);
RESVal = digitalRead(RESPin);
LMSVal = digitalRead(LMSPin);
LESVal = digitalRead(LESPin);
}