where is the error here????

#define ROLL 7
#define THROTTLE 3
#define MOTOR1 2
#define MOTOR2 4
#define MOTOR3 6
#define MOTOR4 8
#define TMAX 1700
#define TMIN 910
#define RMAX 1890
#define RMIN 1085
#define RCENTRE 1476

int throttle1,roll1;
float dt,setpoint,pro_var,pterm,Kp,Kd,dterm,error[2],input;
int gyro_iroll[4]={0,0,0,0},diff=0;
float roll_raw=0,gyro_froll[4];
unsigned long last=0,now=0;
int q,i,j;

float gyro_roll()
{
  last=now;
  now=micros();
  diff=now-last;
  roll_raw = (roll_raw + (((gyro_froll[3] + 2*gyro_froll[2] + 2*gyro_froll[1] + gyro_froll[0])*roll_diff)/6000000));
  for(q=2;q>=0;q--)
    gyro_froll[q+1]=gyro_froll[q];
  gyro_iroll[0]=analogRead(0);
  gyro_froll[0]=gyro_iroll[0]-361;
//  Serial.println(val);
return roll_raw;
}

int roll_pid(roll1,roll_raw)
{
 setpoint =roll1;
 input =roll_raw;
 dt=0;
 Kp=1.25,Kd=-0.5;

 error[0]=setpoint-input;
 pterm=Kp*error[0];
 dt=(millis()-dt)*1000;
 dterm=Kd*(error[0]-error[1])/dt;
 dt=dt/1000;
 error[1]=error[0];
 pro_var=pterm+dterm;

 return pro_var;
}

void setup()
{
  Serial.begin(4800);
  for(q=0;q<=3;q++)
  {
    gyro_iroll[q]=analogRead(0);
    gyro_froll[q]=gyro_iroll[q]-361;
  }
  pinMode(MOTOR1, OUTPUT);
  pinMode(MOTOR2, OUTPUT);
  pinMode(MOTOR3, OUTPUT);
  pinMode(MOTOR4, OUTPUT);
  pinMode(THROTTLE,INPUT);
  pinMode(ROLL,INPUT);
  pinMode(0,INPUT);
}

void loop()
{
 int val1,val2,val3,val4;
 throttle1=pulseIn(THROTTLE,HIGH);
 roll1=pulseIn(ROLL,HIGH);

 if((roll1<RMAX) && (roll1>RMIN))
 {
   if((roll1>RCENTRE-14) && (roll1<RCENTRE+14))
   {
     roll1=0;
   }
   else if((throttle1-TMIN)>(TMAX-throttle1))
     {
       roll1=map(roll1,RMIN,RMAX,-(TMAX-throttle1),(TMAX-throttle1));
     }
     else 
     {
       roll1=map(roll1,RMIN,RMAX,-(throttle1-TMIN),(throttle1-TMIN));
     }
 }

 do
 {
   gyro_roll_raw=gyro_roll();
   roll_pd_value=roll_pid(roll1,gyro_roll_raw);
 
   val1=throttle1;
   val2=throttle1+roll_pd_value;
   val3=throttle1;
   val4=throttle1-roll_pd_value;
  
   digitalWrite(MOTOR1,HIGH);
   delayMicroseconds(val1);
   digitalWrite(MOTOR1,LOW);
   digitalWrite(MOTOR2,HIGH);
   delayMicroseconds(val2);
   digitalWrite(MOTOR2,LOW);
   digitalWrite(MOTOR3,HIGH);
   delayMicroseconds(val3);
   digitalWrite(MOTOR3,LOW);
   digitalWrite(MOTOR4,HIGH);
   delayMicroseconds(val4);
   digitalWrite(MOTOR4,LOW);
 }while(roll_pd_value!=throttle)
}

I know there are many many other errors but this one is not justified.
I'm not even using the variable roll1 in that function..
When i compile it shows this error and highlights the 10th row.
I'm using arduino 17 if that counts...
PLZ Help Out ..

Thanks in advance

this one is not justified.

Well, you may want to take that back... The problem is here:

[glow]int roll_pid(roll1,roll_raw)[/glow]{
 setpoint =roll1;
 input =roll_raw;
 dt=0;

You don't define what roll1 is (or roll_raw for that matter)

The hilight is just on the wrong line (wrong function even...)

You should declare the variable type in the head of the function defination. So:-

int roll_pid(roll1,roll_raw)
{
 setpoint =roll1;
 input =roll_raw;
 dt=0;
 Kp=1.25,Kd=-0.5;

Should be:-

int roll_pid(int roll1, int roll_raw)
{
 setpoint =roll1;
 input =roll_raw;
 dt=0;
 Kp=1.25,Kd=-0.5;

Are these definitions global variables?

int throttle1,roll1;
float dt,setpoint,pro_var,pterm,Kp,Kd,dterm,error[2],input;
int gyro_iroll[4]={0,0,0,0},diff=0;
float roll_raw=0,gyro_froll[4];

Yes, but functions with the same variable name redefine the variable (making them local to the function.)

for example, a global variable:

int iGlobal = 100;

also declared in a function declared like:

void DoSomethingLocal(int iGlobal)
{
   Serial.print(iGlobal);
}

called with

DoSomethingLocal(500);

will print 500, not 100.

thanks everyone..
i thot that declaring it globally will help me prevent from having to declare the type again.

thanks again.