nested if, else if, if, else if fails

I must be doing something wrong, but so far can't see it.

I'm nesting if/'else if' blocks, getting two types of errors that don't make sense to me:

error: expected '}' before 'else'
else if ((linePat[2] == 0) && (linePat[0] == 0));

error: 'else' without a previous 'if'
else if ((linePat[5] == 0) && (linePat[4] == 1) && (linePat[3] == 1));

error: 'else' without a previous 'if'
else if ((linePat[5] == 0) && (linePat[4] == 0) && (linePat[3] == 0) && (linePat[2] == 0) && (linePat[1] == 0) && (linePat[0] == 1));

I've stared at my braces for hours, seems ok. Tried autoformatting. Also tried the trick where you bypass the function conversion in the IDE by using an (almost) empty .ino and renaming the original .ino to .cpp, same errors there.

void loop() 
{
  // debug
  Serial.print("Time void start: ");
  time = millis();
  Serial.println(time);

  if (success == 1) 
  {
    moveStop();
  }
  else if (calDone == 1) 
  {
    readLineSensors();
    // debug
    Serial.print("linePatSum = ");
    Serial.println(linePatSum, BIN);

    // todo: convert switch case to if then else....
    //    if ((linePat[5] == 0) && (linePat[4] == 0) && (linePat[3] == 0) && (linePat[2] == 0) && (linePat[1] == 0) && (linePat[0] == 0)); 
    //    {

    // dead end, turn around: 010000 or x1x000?
    //    if ((linePat[5] == 0) && (linePat[4] == 1) && (linePat[3] == 0) && (linePat[2] == 0) && (linePat[1] == 0) && (linePat[0] == 0)); {
    if ((linePat[4] == 1) && (linePat[2] == 0) && (linePat[1] == 0) && (linePat[0] == 0)); 
    {
      moveSpinLeft();
      // todo: change to looking for line instead of delay
      delay (2000);
      moveForward();
    }
//  }
    // drifting off the line? xxx0x0

// error #1 here

    else if ((linePat[2] == 0) && (linePat[0] == 0)); 
    {
      // drifting left, move right (drift) 0110x0: (011000 or 011010), 0010x0
      if ((linePat[5] == 0) && (linePat[4] == 0) && (linePat[3] == 1)); 
      {
        // move forward & right (drift) 0010x0
        speedRight = speedRightDefault - driftAdjust * 2;
        moveForward();
      }

// error #2 here

      else if ((linePat[5] == 0) && (linePat[4] == 1) && (linePat[3] == 1)); 
      {
        // move forward & right (drift) 0110x0
        speedRight = speedRightDefault - driftAdjust;
        moveForward();
      }

// error #2 here

      else if ((linePat[5] == 0) && (linePat[4] == 0) && (linePat[3] == 0) && (linePat[2] == 0) && (linePat[1] == 0) && (linePat[0] == 1)); 
      {
        // line recovery way left 000001
        moveSpinLeft();
        delay (100);
        moveBackward();
        delay (1000);
        moveSpinRight();
        delay (200);
        moveForward();
      }

Don't put semicolons at the end of the if();

OMG... can't believe I missed that. Works now, many thanks.