Line following with magnetic sensor

I'm sorry..
I am very new to this programming world..
Thank you for the response.

I already change like this...

Is this correct ?

const int limitsw = 9;      // limit switch
const int magnetsens = 8;      // magnetic sensor
const int leftsens = 2;      // left sensor
const int rightsens = 3;      // right sensor

/*-------definning Outputs------*/
const int leftmotor1 = 4;       // left motor
const int leftmotor2 = 5;       // left motor
const int rightmotor1 = 6;       // right motor
const int rightmotor2 = 7;       // right motor