code problem

Hi
I have some problem this PID code please help to check if I compile giving error.

double Setpoint,Input,tmp = 0;
const int numReading=10;
int readings[numReading];
int index=0;
int total=0;
int average=0;
int Duty_C=0;
int error=0;
int prev_error=0;
int out=0;
double P_Gain = 2, I_Gain = 0.3, D_Gain = 0.3; // PID Coefficients example
//I/O pin numbers
int sensorPin = 0; 
int setpointPin = 1; 
int PWM_Pin = 3;
void setup()
{
  for (int thisReading = 0; //thisReading < numReadings;thisReading++) 
  readings[thisReading] = 0;


Setpoint = analogRead (1); 
pinMode(PWM_Pin, OUTPUT); // DC motor control
}

void loop()
{
Setpoint = analogRead(setpointPin); //reading setpoint
delay(100); //100ms delay
//Reading temperature average of 10 samples
// subtract the last reading:
total= total - readings[index];
// read from the sensor:
readings[index] = analogRead(sensorPin);
// add the reading to the total:
total= total + readings[index];
// advance to the next position in the array:
index = index + 1;
delay(50);//50ms delay
// if we're at the end of the array...
if (index >= numReadings)
// ...wrap around to the beginning:
  // ...wrap around to the beginning:
index = 0;
// calculate the average:
average = total / numReadings;
// send it to the computer (as ASCII digits)
delay(20); //20ms delay
//Temperature = (5*average*100)/1024
if(average <= 20 )// if the temperature is too low (equal to or less than 10 degrees)
{
digitalWrite(13,HIGH); //turn the blue LED on, which is connected to the digital pin 13
out = 0;
analogWrite(PWM_Pin, out); // Fan off
delay(100);
}
/*
else if (average > 52) /
{
analogWrite(PWM_Pin, 255); //Fan Full speed , it's too hot!
delay(100);
}*/
else //otherwise calculate the needed speed
{
tmp = analogRead(1); //reading setpoint
Setpoint = tmp/10;
delay(100);//100ms d
error = average - Setpoint; //calculate the difference
delay(10);//10ms delay
if(error > 1)
{
Duty_C = pid(error, prev_error); // call pid function
out = error ;//+ 32; //run fan , calculated error + minimum output to run the fan
delay(200); //200ms delay
analogWrite(PWM_Pin, out); // write to the Fan
digitalWrite(13,HIGH); // write to the blue cool diod
delay(500); //0.5s delay
prev_error = error; //save old error to be used by the PID function
Duty_C = 0; // reset register
}
else
{
out = 0;
analogWrite(PWM_Pin, out); // motor off it's too cold and start blinking the blue diod
digitalWrite(13,HIGH); // write to the blue cool diod
delay(200);
digitalWrite(13,LOW); // write to the blue cool diod
delay(200);
}
}
}

What do you think you are doing here?

  for (int thisReading = 0; //thisReading < numReadings;thisReading++)

Why is half the statement commented out?

The rest of the errors complain about numReadings. Why are you using numReadings in the code? You have a variable called numReading (without the s).