Else if code problems

Hi guys, this might be a really simple to do but I can't seem to add a a function which allows me to turn of all the LED's using the off subroutine and then delaying? Also it seems to run through all the else commands instead of doing one then returning to the beginning, any help would be greatly appreciated :)

//initialize variables for sensor pins
int moistPin = 0;


//initialize variables to store readings from sensors
int moistVal = 0;


//initialize variables for LED pins
int redPin = 11;
int greenPin = 10;
int bluePin = 9;


void setup()
{
  //initialize the serial port
  Serial.begin(9600);

  //set LED pins to output mode
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);

  //set LED pins to off
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, LOW);
}

void loop()
{
  //read values from the sensors
  moistVal = analogRead(moistPin);


  //display the readings on the serial monitor in a coherent way
  Serial.print("moisture reads ");
  Serial.println(moistVal);


  //wait one second before continuing. we're doing this so that we don't just see readings fly by the screen
  delay(1000);

  //turn on LED to blue, others off if moisture pins are touching together
  if (moistVal, 0, 300)
  {
    blue();
  }
  else
  {
    off();
  }

  //wait one second
  delay(10000);
  if (moistVal, 300, 600)
  {
    red();
  }
  else
  {
    off();
  }

  //wait one second
  delay(10000);
  //turn on green if light sensor reads 600 or brighter
  if (moistVal, 600, 1000)
  {
    green();
  }
  else
  {
    off();
  }
  //wait one second
  delay(10000);
  
}

void blue()
{
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, HIGH);
}

void red()
{
  digitalWrite(redPin, HIGH);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, LOW);
}

void green()
{
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, HIGH);
  digitalWrite(bluePin, LOW);
}

void off()
{
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, LOW);

}

void on()
{
  digitalWrite(redPin, HIGH);
  digitalWrite(greenPin, HIGH);
  digitalWrite(bluePin, HIGH);
}/code]
  if (moistVal, 0, 300)
 if (moistVal, 300, 600)

What syntax should that be?
Maybe you wanted something like

 if (moistVal <= 300)
 if (moistVal >  300 && moistVal <= 600)

Just changed that code and it works and solves the other issue, thanks