having problems with if else

HI, I am new to arduino I have an uno 3 and adafruit motor controller which i am using to control a robot using IR ,This works fine but at present I am only at the stage where i can modifying other people code ,I have books on order . I have also predefined TimeDelay as a global integer.
My problem :-

void goRight()
 {
  TimeDelay = TimeDelay - 1;
  myMotor->setSpeed(150);
  myMotor->run(FORWARD);
  myOtherMotor ->setSpeed(150);
  myOtherMotor->run(BACKWARD);
  Serial.println("going Right....");
  Serial.println(TimeDelay); 
if(TimeDelay == 0);
  {
  goStop();
 TimeDelay = 30;
  }
  else 
     {goRight();}
 }

I am trying to make the robot turn 45 then stop ...
the error code is :-
motor_with_remote.ino: In function 'void goRight()':
motor_with_remote:61: error: 'else' without a previous 'if'

Can some point me in the right direction please

Try this ...

  if(TimeDelay == 0) // <<<<< REMOVED ; HERE
  {
    goStop();
    TimeDelay = 30;
  }
  else 
  {
    goRight();
  }

Also, use auto-format (CTRL-T) in the IDE to lay out the code better.

Welcome....

You're ending your "if" prematurely with the ; here....

if(TimeDelay == 0);

.... so the "else" has no "if" to hook onto.

Compare that with the example here.

Also, if it did compile, it would mean that the lines you expect to be in your "if", namely:

  {
  goStop();
 TimeDelay = 30;
  }

.... wouldn't be, because the ; already ended the "if".