user14921: #include <QTRSensors.h>
#define NUM_SENSORS 8
#define TIMEOUT 2500
#define EMITTER_PIN QTR_NO_EMITTER_PIN 
QTRSensorsRC qtrrc((unsigned char[]) {10,7,6, 5, 4, 2,16,14},
NUM_SENSORS, TIMEOUT, EMITTER_PIN);

unsigned int sensorValues[NUM_SENSORS];
int dirB = 12;
int speedB = 3;
int brakeB = 8;
int dirA = 13;
int speedA = 11;
int brakeA = 9;
int e=4;
int MzSensor=17;
int xp=4;

void setup() {
delay(500);
int i;
pinMode(13,OUTPUT);
digitalWrite(13,HIGH);
for (i = 0; i < 200; i++)
{
  qtrrc.calibrate();
}
digitalWrite(13,LOW);
Serial.begin(9600);
delay(100);
Serial.println("Robot");
for (i = 0; i < NUM_SENSORS; i++)
{
  Serial.print(qtrrc.calibratedMinimumOn[i]);
  Serial.print(' ');
}
Serial.println();
{
  Serial.print(qtrrc.calibratedMaximumOn[i]);
  Serial.print(' ');
}
Serial.println();
Serial.println();
delay(100);
}
void loop() {
Serial.print('ogeday');
unsigned int position = qtrrc.readLine(sensorValues);
unsigned char i;
for (i = 0; i <NUM_SENSORS; i++)
{
  Serial.print(sensorValues[i] * 10 / 1001);
  Serial.print(' ');
}
Serial.print("   ");
Serial.println(position);
delay(200);
if (digitalRead(MzSensor)==0) {
  while(digitalRead(MzSensor)==0) {
    digitalWrite (dirA, HIGH);
    analogWrite(speedA, 76);
    digitalWrite(dirB, HIGH);
    analogWrite(speedB, 76);
    xp == 5;
    Serial.println("durdu");
    delay(100);
  }
  delay(800);
  Serial.println("CIKTI");
}
else
if (position >= 3250 &&position <= 3750)
{
  if(sensorValues [1] < 500 )
  {
    e=7;
    xp=3;
  }
  if(sensorValues [8] < 500 )
  {
    e=1;
    xp=3;
  }
  if (sensorValues[3] < 500 || sensorValues[4] < 500 || sensorValues [5] <
  Serial.println("ILERI"),
  digitalWrite(dirA, HIGH),
  digitalWrite(brakeA, LOW),
  analogWrite(speedA, 72),
  digitalWrite(dirB, HIGH),
  digitalWrite(brakeB, LOW),
  analogWrite(speedB, 72),
  e=4,
  xp=3,

  delay (1),

}

 else if (position > 4050 || sensorValues [8] <500)
  {
    Serial.println("EN SAG");
    digitalWrite(dirA, LOW);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 19);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 45);
    e=1;
    xp=3;
  }
  else if (position <- 4050 &&position >- 3900)
  {
    Serial.println("SAG");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 51);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 60);
    e=1;
    xp=3;
  }
  else if (position >= 2950 &&position <= 3100)
  {
    Serial.println("SOL");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 60);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 51);
    e=7;
    xp=3;
  }
  else if (position < 2950 || sensorValues [1] < 300 )
  {
    Serial.println("EN SOL");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 45);
    digitalWrite(dirB, 45);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 19);
    e=7;
    xp=3;
  }
  else if (e==7) {
    Serial.println("Cizgi SOLLL");
    if (xp!=1){
      digitalWrite(dirA, LOW);
      digitalWrite(brakeA, LOW);
      analogWrite(speedA, 30);
      digitalWrite(dirB, LOW);
      digitalWrite(brakeB, LOW);
      analogWrite(sppedB, 30);
      xp=1;
      delay(1); 
    }
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 66);
    digitalWrite(dirB, LOW);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 48);
    e=7;
  }
  else if (e==1) {
    Serial.pirntln("{Cizgi SAGGG");
    if(xp!=1) {
      digitalWrite(dirA, LOW);
      digitalWrite(brakeA, LOW);
      analogWrite(speedA, 30);
      digitalWrite(dirB, LOW);
      digitalWrite(brakeB, LOW);
      xp=1;
      delay(1);
    }
    digitalWrite(dirA, LOW);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 48);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 66);
    e=1;
  }
  else if (e==4) {
    Serial.println("ILERI GIDIYOR");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 30);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 30);
    e=4;
  }
  //delay(300)
}


user11030: In this part:
if (sensorValues[3] < 500 || sensorValues[4] < 500 || sensorValues [5] <
Serial.println("ILERI"),
digitalWrite(dirA, HIGH),
digitalWrite(brakeA, LOW),
analogWrite(speedA, 72),
digitalWrite(dirB, HIGH),
digitalWrite(brakeB, LOW),
analogWrite(speedB, 72),
e=4,
xp=3,

delay (1),

There's a lot of ',' instead of ';'. Change then to ';'.
Also, the 'if' is incomplete. Check the 'if' statement.

user14766: Change delay (1), to delay (1);

14921: <pre><code>#include &lt;QTRSensors.h&gt;
#define NUM_SENSORS 8
#define TIMEOUT 2500
#define EMITTER_PIN QTR_NO_EMITTER_PIN 
QTRSensorsRC qtrrc((unsigned char[]) {10,7,6, 5, 4, 2,16,14},
NUM_SENSORS, TIMEOUT, EMITTER_PIN);

unsigned int sensorValues[NUM_SENSORS];
int dirB = 12;
int speedB = 3;
int brakeB = 8;
int dirA = 13;
int speedA = 11;
int brakeA = 9;
int e=4;
int MzSensor=17;
int xp=4;

void setup() {
delay(500);
int i;
pinMode(13,OUTPUT);
digitalWrite(13,HIGH);
for (i = 0; i &lt; 200; i++)
{
  qtrrc.calibrate();
}
digitalWrite(13,LOW);
Serial.begin(9600);
delay(100);
Serial.println("Robot");
for (i = 0; i &lt; NUM_SENSORS; i++)
{
  Serial.print(qtrrc.calibratedMinimumOn[i]);
  Serial.print(' ');
}
Serial.println();
{
  Serial.print(qtrrc.calibratedMaximumOn[i]);
  Serial.print(' ');
}
Serial.println();
Serial.println();
delay(100);
}
void loop() {
Serial.print('ogeday');
unsigned int position = qtrrc.readLine(sensorValues);
unsigned char i;
for (i = 0; i &lt;NUM_SENSORS; i++)
{
  Serial.print(sensorValues[i] * 10 / 1001);
  Serial.print(' ');
}
Serial.print("   ");
Serial.println(position);
delay(200);
if (digitalRead(MzSensor)==0) {
  while(digitalRead(MzSensor)==0) {
    digitalWrite (dirA, HIGH);
    analogWrite(speedA, 76);
    digitalWrite(dirB, HIGH);
    analogWrite(speedB, 76);
    xp == 5;
    Serial.println("durdu");
    delay(100);
  }
  delay(800);
  Serial.println("CIKTI");
}
else
if (position &gt;= 3250 &amp;&amp;position &lt;= 3750)
{
  if(sensorValues [1] &lt; 500 )
  {
    e=7;
    xp=3;
  }
  if(sensorValues [8] &lt; 500 )
  {
    e=1;
    xp=3;
  }
  if (sensorValues[3] &lt; 500 || sensorValues[4] &lt; 500 || sensorValues [5] &lt;
  Serial.println("ILERI"),
  digitalWrite(dirA, HIGH),
  digitalWrite(brakeA, LOW),
  analogWrite(speedA, 72),
  digitalWrite(dirB, HIGH),
  digitalWrite(brakeB, LOW),
  analogWrite(speedB, 72),
  e=4,
  xp=3,

  delay (1),

}

 else if (position &gt; 4050 || sensorValues [8] &lt;500)
  {
    Serial.println("EN SAG");
    digitalWrite(dirA, LOW);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 19);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 45);
    e=1;
    xp=3;
  }
  else if (position &lt;- 4050 &amp;&amp;position &gt;- 3900)
  {
    Serial.println("SAG");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 51);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 60);
    e=1;
    xp=3;
  }
  else if (position &gt;= 2950 &amp;&amp;position &lt;= 3100)
  {
    Serial.println("SOL");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 60);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 51);
    e=7;
    xp=3;
  }
  else if (position &lt; 2950 || sensorValues [1] &lt; 300 )
  {
    Serial.println("EN SOL");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 45);
    digitalWrite(dirB, 45);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 19);
    e=7;
    xp=3;
  }
  else if (e==7) {
    Serial.println("Cizgi SOLLL");
    if (xp!=1){
      digitalWrite(dirA, LOW);
      digitalWrite(brakeA, LOW);
      analogWrite(speedA, 30);
      digitalWrite(dirB, LOW);
      digitalWrite(brakeB, LOW);
      analogWrite(sppedB, 30);
      xp=1;
      delay(1); 
    }
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 66);
    digitalWrite(dirB, LOW);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 48);
    e=7;
  }
  else if (e==1) {
    Serial.pirntln("{Cizgi SAGGG");
    if(xp!=1) {
      digitalWrite(dirA, LOW);
      digitalWrite(brakeA, LOW);
      analogWrite(speedA, 30);
      digitalWrite(dirB, LOW);
      digitalWrite(brakeB, LOW);
      xp=1;
      delay(1);
    }
    digitalWrite(dirA, LOW);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 48);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 66);
    e=1;
  }
  else if (e==4) {
    Serial.println("ILERI GIDIYOR");
    digitalWrite(dirA, HIGH);
    digitalWrite(brakeA, LOW);
    analogWrite(speedA, 30);
    digitalWrite(dirB, HIGH);
    digitalWrite(brakeB, LOW);
    analogWrite(speedB, 30);
    e=4;
  }
  //delay(300)
}
</code></pre>
 11030: <p>In this part:</p>

<pre><code>if (sensorValues[3] &lt; 500 || sensorValues[4] &lt; 500 || sensorValues [5] &lt;
Serial.println("ILERI"),
digitalWrite(dirA, HIGH),
digitalWrite(brakeA, LOW),
analogWrite(speedA, 72),
digitalWrite(dirB, HIGH),
digitalWrite(brakeB, LOW),
analogWrite(speedB, 72),
e=4,
xp=3,

delay (1),
</code></pre>

<p>There's a lot of ',' instead of ';'. Change then to ';'.</p>

<p>Also, the 'if' is incomplete. Check the 'if' statement.</p>
 14766: <p>Change <code>delay (1),</code> to <code>delay (1);</code></p>
