compiling errors

here is my code!
i know i have several errors! if someone could help me fix this.

#include <LiquidCrystal.h>  // include the library code:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  // initialize the library with the numbers of the interface pins
#define length 6            //the length of array.
float voltage = 1.8;        // the volatge value to compare with the sensor value.
int pump = 13;              // select the pin for the pump.

float sensorOne = A0;       // select the input pin for the first sensor.
float sensorValue[length];  // variable to store the value coming from the sensor.
int valve = 9;             // the pin for the first sensor valve.
float sum=0;                // the sum of the sensorOne reading.
float avrage =0;            // the avrage reading for sensorOne reading.

float sensorTwo = A1;       // select the input pin for the second sensor.
float sensor2Value[length]; // variable to store the value coming from the sensor.
int valve2 = 8;             // the pin for the first sensor valve.
float sum2=0;               // the sum of the sensorTwo reading.
float avrage2=0;            // the avrage reading for sensorTwo reading.

float sensorThree = A2;     // select the input pin for the second sensor.
int maxTemp = 85;           // the maximum temperature.
float sensor3Value[length]; // variable to store the value coming from the sensor.
int valve3 = 7;              // the pin for the first sensor valve.
float sum3=0;               // the sum of the sensorTwo reading.
float avrage3=0;            // the avrage reading for sensorTwo reading.

void setup() {
  lcd.begin(20, 4);
  lcd.print("Starting...");    // Print a message to the LCD.
  delay(30000);                // Delay 5 seconds.
  lcd.clear();
  delay(1000);
  Serial.begin(9600);	       // initialize serial communication with computer
  pinMode(sensorOne, INPUT);   // declare sensorOne as input.
  pinMode(sensorTwo, INPUT);   // declare sensorTwo as input.
  pinMode(sensorThree, INPUT); // declare sensorThree as input.
  pinMode(pump, OUTPUT);       // declare pump as an OUTPUT.
  pinMode(valve, OUTPUT);      // declare valve as output.
  pinMode(valve2, OUTPUT);     // declare valve2 as output.
  pinMode(valve3, OUTPUT);     // declare valve3 as output.
}

void loop() {
  lcd.backLight(true);
  for (int positionCounter = 0; positionCounter < 29; positionCounter++) {
  lcd.scrollDisplayRight();    // scroll one position right:
  delay(150);                  // wait a bit:
  }
  digitalWrite(pump, LOW);     // turn off the pump.
  digitalWrite(valve, LOW);
  digitalWrite(valve2, LOW);
  digitalWrite(valve3, LOW);
  digitalWrite(sensorOne, HIGH);
  digitalWrite(sensorTwo, HIGH);
  digitalWrite(sensorThree, HIGH);
  
  sensorValue = analogRead(sensorOne);      // read sensorOne value.
  lcd.setCursor(0, 1)
  lcd.print("Sensor One = ");
  lcd.print(sensorOne);
  sensor2Value = analogRead(sensorTwo);    // read sensorTwo value.
  lcd.setCursor(0, 16)
  lcd.print("Sensor Two = ");
  lcd.print(sensorTwo);
   
  sensor3Value = analogRead(sensorThree);  // read sensorThree value.
  lcd.setCursor(1, 1)
  lcd.print("Sensor Three = ");
  lcd.print(sensorThree);
   
  if (sensorOne < voltage $ sensorTwo < voltage){
    while ((sensorOne < voltage $ sensorTwo < voltage){
    digitalWrite(pump, HIGH);
    digitalWrite(valve, HIGH);
    digitalWrite(valve2, HIGH);
      for (int i=0; i<6; i++){
       sensorValue[i];
       /////// update and print in the screen the value of 1st sensor.
       sum = sum + sensorValue[i];
       delay(50000);
     }
     avrage = sum/10;
     sensorOne = avrage;
    }
    /////// update the valve condition
       for (int i=0; i<10; i++){
         sensor2Value[i];
         /////// update and print in the screen the value of 2nd sensor.
       sum2 = sum2 + sensor2Value[i];
       delay(50000);
     }
     avrage2 = sum2/10;
     sensorTwo = avrage2;
   }
  }
  
  else if(sensorOne < voltage){
     digitalWrite(pump, HIGH);
     digitalWrite(valve, HIGH);
     for (int i=0; i<6; i++){
       sensorValue[i];
       /////// update and print in the screen the value of 1st sensor.
       sum = sum + sensorValue[i];
       delay(50000);
     }
     avrage = sum/10;
     sensorOne = avrage;
   }
   
   else if(sensorTwo < voltage){
     digitalWrite(pump, HIGH);
     
     for (int i=0; i<10; i++){
       sensor2Value[i];
       /////// update and print in the screen the value of 2nd sensor.
       sum2 = sum2 + sensor2Value[i];
       delay(50000);
     }
     avrage2 = sum2/10;
     sensorTwo = avrage2;
   }
   else if(sensorThree > maxTemp && hum < 70){
     digitalWrite(pump, HIGH);
     for (int i=0; i<6; i++){
       sensor3Value[i];
       /////// update and print in the screen the value of 3rd sensor.
       sum3 = sum3 + sensor3Value[i];
       delay(50000);
     }
     avrage3 = sum3/10;
     sensorThee = avrage3;
   } 
   else 
   lcd.print("the probe is in great condition.");
 }

Well, first off, 30000 is 30 seconds. It is in milliseconds, so 5000ms is 5 seconds.

Secondly, you can’t use a $$ operator. There isn’t one. I am sure that you meant &&.

LCD also does not have a back light. It is a pin that has to be set high if you want it on. If you want it on constantly, you can plug it into a high signal.

Another big issue is that you were trying to assign an entire array a single value. You need to have more information in the code for what you wanted to do. Also, you should try to make sure you don’t have typos. There were a few like hum instead of sum, etc.

Here is the code without errors. I changed a couple of things so just make sure that it is running how you want.

#include <LiquidCrystal.h>  // include the library code:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  // initialize the library with the numbers of the interface pins
#define length 6            //the length of array.
float voltage = 1.8;        // the volatge value to compare with the sensor value.
int pump = 13;              // select the pin for the pump.

float sensorOne = A0;       // select the input pin for the first sensor.
float sensorValue[length];  // variable to store the value coming from the sensor.
int valve = 9;             // the pin for the first sensor valve.
float sum=0;                // the sum of the sensorOne reading.
float avrage =0;            // the avrage reading for sensorOne reading.

float sensorTwo = A1;       // select the input pin for the second sensor.
float sensor2Value[length]; // variable to store the value coming from the sensor.
int valve2 = 8;             // the pin for the first sensor valve.
float sum2=0;               // the sum of the sensorTwo reading.
float avrage2=0;            // the avrage reading for sensorTwo reading.

float sensorThree = A2;     // select the input pin for the second sensor.
int maxTemp = 85;           // the maximum temperature.
float sensor3Value[length]; // variable to store the value coming from the sensor.
int valve3 = 7;              // the pin for the first sensor valve.
float sum3=0;               // the sum of the sensorTwo reading.
float avrage3=0;            // the avrage reading for sensorTwo reading.

void setup() {
  lcd.begin(20, 4);
  lcd.print("Starting...");    // Print a message to the LCD.
  delay(30000);                // Delay 5 seconds.
  lcd.clear();
  delay(1000);
  Serial.begin(9600);	       // initialize serial communication with computer
  pinMode(sensorOne, INPUT);   // declare sensorOne as input.
  pinMode(sensorTwo, INPUT);   // declare sensorTwo as input.
  pinMode(sensorThree, INPUT); // declare sensorThree as input.
  pinMode(pump, OUTPUT);       // declare pump as an OUTPUT.
  pinMode(valve, OUTPUT);      // declare valve as output.
  pinMode(valve2, OUTPUT);     // declare valve2 as output.
  pinMode(valve3, OUTPUT);     // declare valve3 as output.
}

void loop() {

  for (int positionCounter = 0; positionCounter < 29; positionCounter++) {
  lcd.scrollDisplayRight();    // scroll one position right:
  delay(150);                  // wait a bit:
  }
  digitalWrite(pump, LOW);     // turn off the pump.
  digitalWrite(valve, LOW);
  digitalWrite(valve2, LOW);
  digitalWrite(valve3, LOW);
  digitalWrite(sensorOne, HIGH);
  digitalWrite(sensorTwo, HIGH);
  digitalWrite(sensorThree, HIGH);
  
  sensorValue[0] = analogRead(sensorOne);      // read sensorOne value.
  lcd.setCursor(0, 1);
  lcd.print("Sensor One = ");
  lcd.print(sensorOne);
  sensor2Value[0] = analogRead(sensorTwo);    // read sensorTwo value.
  lcd.setCursor(0, 16);
  lcd.print("Sensor Two = ");
  lcd.print(sensorTwo);
   
  sensor3Value[0] = analogRead(sensorThree);  // read sensorThree value.
  lcd.setCursor(1, 1);
  lcd.print("Sensor Three = ");
  lcd.print(sensorThree);
   
  if (sensorOne < voltage && sensorTwo < voltage){
    while (sensorOne < voltage &&  sensorTwo < voltage){
    digitalWrite(pump, HIGH);
    digitalWrite(valve, HIGH);
    digitalWrite(valve2, HIGH);
      for (int i=0; i<6; i++){
       sensorValue[i];
       /////// update and print in the screen the value of 1st sensor.
       sum = sum + sensorValue[i];
       delay(50000);
     }
     avrage = sum/10;
     sensorOne = avrage;
    }
    /////// update the valve condition
       for (int i=0; i<10; i++){
         sensor2Value[i];
         /////// update and print in the screen the value of 2nd sensor.
       sum2 = sum2 + sensor2Value[i];
       delay(50000);
     }
     avrage2 = sum2/10;
     sensorTwo = avrage2;
   }
  
  
  else if(sensorOne < voltage){
     digitalWrite(pump, HIGH);
     digitalWrite(valve, HIGH);
     for (int i=0; i<6; i++){
       sensorValue[i];
       /////// update and print in the screen the value of 1st sensor.
       sum = sum + sensorValue[i];
       delay(50000);
     }
     avrage = sum/10;
     sensorOne = avrage;
   }
   
   else if(sensorTwo < voltage){
     digitalWrite(pump, HIGH);
     
     for (int i=0; i<10; i++){
       sensor2Value[i];
       /////// update and print in the screen the value of 2nd sensor.
       sum2 = sum2 + sensor2Value[i];
       delay(50000);
     }
     avrage2 = sum2/10;
     sensorTwo = avrage2;
   }
   else if(sensorThree > maxTemp && sum < 70){
     digitalWrite(pump, HIGH);
     for (int i=0; i<6; i++){
       sensor3Value[i];
       /////// update and print in the screen the value of 3rd sensor.
       sum3 = sum3 + sensor3Value[i];
       delay(50000);
     }
     avrage3 = sum3/10;
     sensorThree = avrage3;
   } 
   else 
     lcd.print("the probe is in great condition.");
 }

You have a lot of problems with variable types. For instance, you have this statement:

  sensorValue[0] = analogRead(sensorOne);      // read sensorOne value.

The analogRead statement expects a pin number as input. Is it possible for you to plug something into pin # 3.75? Of course not. So why is sensorOne a float variable?

The analog pins are input only. So, these statements are unnecessary:

  pinMode(sensorOne, INPUT);   // declare sensorOne as input.
  pinMode(sensorTwo, INPUT);   // declare sensorTwo as input.
  pinMode(sensorThree, INPUT); // declare sensorThree as input.

Since the analog pins are input only, these statements make no sense:

  digitalWrite(sensorOne, HIGH);
  digitalWrite(sensorTwo, HIGH);
  digitalWrite(sensorThree, HIGH);

You can’t perform a write on an analog pin, and, even if you could, using a digital function on an analog pin does not make sense.

Next, the output from the analogRead function is an integer. It is a value between 0 and 1023 that represents the ratio of the measured voltage to the VRef value. It is NOT a voltage value. The output from the function should be stored in an int, not a float.

      for (int i=0; i<6; i++){
       sensorValue[i];
       /////// update and print in the screen the value of 1st sensor.
       sum = sum + sensorValue[i];
       delay(50000);
     }

What do you think the sensorValue*; statement is doing? Is there supposed to be an assignment statement there?*
If you are taking 6 readings, each of which returns a value from 0 to 1023, the sum of the 6 readings will fit in an int. What purpose does storing the values in an array serve?
* *    sensorOne = avrage;* *
You want to change the pin number that the sensor is attached to based on the average of the reading from the sensor attached to that pin. Why on earth would you want to do that?
jp128 made some suggestions, too, but they do not address the fundamental mistakes in your code.

PaulS, thanks for saying that. I didn't take any time to look at the code to see the logical mistakes that were being made. I only made them syntactically correct rather then semantically. Thanks :P

I'd have to say that as a first program, it's a tad ambitious.

Yes it is my first coding program to write for Arduino! well what i was thinking is the analog reading is read a voltage not a number as u said. i'm using VG400 soil sensor. so should i just read from sensorOne and store it the value in different variable and start the comparing if the moisture is low will turn on the pump, else i will take several reading and take the average of it, then compare!! so if my code is not write could someone help me with it!!

so if my code is not write could someone help me with it

I think they already have.

  else if(sensorOne < voltage){
     while (sensorOne < voltage){
     digitalWrite(pump, HIGH);
     digitalWrite(valve, HIGH);
     for (int i=0; i<6; i++){
       sensorValue[i];
       /////// update and print in the screen the value of 1st sensor.
       sum = sum + sensorValue[i];
       delay(50000);
     }
     avrage = sum/10;
     sensorOne = avrage;
  }
}

wil this fix it! if i apply it to all the conditions.

for (int i=0; i<6; i++){
       sensorValue[i];

How about putting a value into sensorValue*?*
(Or, thinking about it, why bother with an array, why not just sum some readings?)

Groove:

for (int i=0; i<6; i++){

sensorValue[i];



How about putting a value into sensorValue*?*
*(Or, thinking about it, why bother with an array, why not just sum some readings?)*
*[/quote]*
*can i just simply sum the readings from analogRead in the for loop!* 
*if yes how!!!*

sum += analogRead (x);

Of course, it is a good idea to zero the sum first.

cool, i'm modifying my codes! hopefully get it work.