Problems with SerialPrint.

Hey guys, it's been a long time since I used an Arduino. I just downloaded the latest version of the program and I found something I want to try but I think the code is a bit old haha, I tried some stuff but there's always a new error, this is the code.

int Forward = 2;
int Backward = 3;
int Left = 4;
int Right = 5;

int Low_Limit = 88;
int High_Limit = 168;

void setup()
{
  // begin the serial communication
  Serial.begin(38400);
  
  // Set Output pins
  pinMode(Forward, OUTPUT);
  pinMode(Backward, OUTPUT);
  pinMode(Left, OUTPUT);
  pinMode(Right, OUTPUT);
}

void loop()
{
  byte x,y;
  while (!Serial.available());
  if (Serial.available() >0 ) {
    x = Serial.read();
     Serial.print(x, BYTE);
  }
  while (!Serial.available());
  if (Serial.available() >0 ) {
    y = Serial.read();
     Serial.print(y,BYTE);
  }
  
  // Back and forward
  
  if ( x > High_Limit)
    {
      digitalWrite(Forward, HIGH);
      digitalWrite(Backward, LOW);
    }
  else if( x < Low_Limit)
    {
     digitalWrite(Forward, LOW);
     digitalWrite(Backward, HIGH);   
    }
    else 
    {
     digitalWrite(Forward, LOW);
     digitalWrite(Backward, LOW);   
    }
   
  //Left and Right 
  if ( y > High_Limit)
    {
      digitalWrite(Right, HIGH);
      digitalWrite(Left, LOW);
    }
  else if( y < Low_Limit)
    {
     digitalWrite(Right, LOW);
     digitalWrite(Left, HIGH);   
    }
    else 
    {
     digitalWrite(Right, LOW);
     digitalWrite(Left, LOW);   
    }    
}

What could I do?

The error, which you sadly did not post, was:

As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.

Perhaps you should user Serial.write ?

I changed it, but now this is the code

int Forward = 2;
int Backward = 3;
int Left = 4;
int Right = 5;

int Low_Limit = 88;
int High_Limit = 168;

void setup()
{
  // begin the serial communication
  Serial.begin(38400);
  
  // Set Output pins
  pinMode(Forward, OUTPUT);
  pinMode(Backward, OUTPUT);
  pinMode(Left, OUTPUT);
  pinMode(Right, OUTPUT);
}

void loop()
{
  byte x,y;
  while (!Serial.available());
  if (Serial.available() >0 ) {
    x = Serial.read();
     Serial.print(x, BYTE);
  }
  while (!Serial.available());
  if (Serial.available() >0 ) {
    y = Serial.read();
     Serial.print(y,BYTE);
  }
  
  // Back and forward
  
  if ( x > High_Limit)
    {
      digitalWrite(Forward, HIGH);
      digitalWrite(Backward, LOW);
    }
  else if( x < Low_Limit)
    {
     digitalWrite(Forward, LOW);
     digitalWrite(Backward, HIGH);   
    }
    else 
    {
     digitalWrite(Forward, LOW);
     digitalWrite(Backward, LOW);   
    }
   
  //Left and Right 
  if ( y > High_Limit)
    {
      digitalWrite(Right, HIGH);
      digitalWrite(Left, LOW);
    }
  else if( y < Low_Limit)
    {
     digitalWrite(Right, LOW);
     digitalWrite(Left, HIGH);   
    }
    else 
    {
     digitalWrite(Right, LOW);
     digitalWrite(Left, LOW);   
    }    
}

And a new error appears and this is the new error.

carrito.ino: In function 'void loop()':
carrito:27: error: expected primary-expression before ')' token
carrito:32: error: expected primary-expression before ')' token

What should I do? I've been investigating but I can't see the mistake. I know it's going to be something really basic.
Thank you for your help.

I pasted your code into 0022. I got this "error" message:

Binary sketch size: 2512 bytes (of a 30720 byte maximum)

chemariachi:
I changed it

Doesn't look like it:

     Serial.print(x, BYTE);
     ...
     Serial.print(y,BYTE);

You might have changed it, but the code you posted still has the BYTE keyword.