Weird Error

heya I'm doing an urgent project and I got a really weird problem, a section of my code just doesnt run
//Temperature 1 check and Relay Change
lcd.setCursor(0,1);
if (ti > (heatTrigger1) )
{
digitalWrite(RELAY3, LOW);
digitalWrite(RELAY2, LOW);
lcd.print("");
Serial.println("heat-");
}
else if (ti < (heatTrigger2) )
{
digitalWrite(RELAY3, HIGH);
digitalWrite(RELAY2, HIGH);
lcd.print("
");
Serial.println("heat+");
}
else if (ti == (heatWanted) )
{
lcd.print("*");
Serial.println("heat=");
}

but its counterpart runs perfectly

//Humidity Check and Relay change
lcd.setCursor(10,1);
if ( hi >= HumTrigger)
{
digitalWrite(RELAY3, LOW);
digitalWrite(RELAY4, LOW);
lcd.print("-");
Serial.println("hum-");
}
else if (hi <= HumTrigger)
{
digitalWrite(RELAY3, HIGH);
digitalWrite(RELAY4, HIGH);
lcd.print("+");
Serial.println("hum+");
}
else if(hi == humWanted)
{
lcd.print("=");
Serial.println("hum=");
}

PLEASE URGENT HELP NEEDED

PLEASE URGENT HELP NEEDED

I'm sure that the fine folks at http://snippets-r-us.com will be able to help you with your snippets.

Here, we have no clue how ti, heatTrigger1, etc. are defied, what values they contain, or what "it doesn't work" means.

You have two trigger values for heat but only one for humidity. Is this intentional?

Runs perfectly? Maybe, but there is unreachable code.

   if ( hi >= HumTrigger) { ... }       // one of these
  else if (hi <= HumTrigger) { ... }   // is always true

  else if(hi == humWanted) { ... }     // this is never checked

Welcome to the Forum. Please read the two posts by Nick Gammon at the top of this Forum for guidelines on posting here, especially the use of code tags when your are presenting source code. It will help us help you.