LCD problems

hey guys, i hooked up a 16x2 lcd, and i cant get it to work the way it should!
it only displays what i write in the void setup, if i try anything in void loop it has no effect
here is my code:

//Code by Dusan
//This code is public and open source
//Credits: BARRAGAN, JEREMY BLUM

#include <Servo.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(5,7,8,9,10,11);



Servo servo;
int pos;

float tempC;
int light;
int lightPin = 5;
int tempPin = 2;
int relay = 2;
int reading;
int buzzer = 4;
int i;


void setup ()
{
  lcd.begin(16,2);
  Serial.begin(9600);
 
  
  servo.attach(6);
  
  pinMode(relay, OUTPUT);
  pinMode(lightPin, INPUT);
  pinMode(buzzer, OUTPUT);  
}

void loop()
{
  for(int i=1; i <= 92; i++)
  {
    Serial.println(i);
    

//loop startup, sensor readings and loop sequencing
  analogRead(lightPin);
  delay(10);
  light = map((analogRead(lightPin)),750,1023,255,0) ;
  delay(10);
  analogRead(tempPin);
  delay(10);
  reading = analogRead(tempPin);
  tempC = (5.0*reading*100)/1023;
  
  
  
  Serial.print("Temperature = ");
  Serial.print(tempC);
  Serial.println(" C");
  Serial.print("Light level = "); 
  Serial.println(light);
  //first IF statement
  if(light > 100)
  {
    digitalWrite(buzzer, HIGH);
    delay(100);
    digitalWrite(buzzer, LOW);
  }
   else
   {
     digitalWrite(buzzer, LOW);
   }
 //Seconf IF Statement
 if(i <= 46)
 {
   digitalWrite(relay, HIGH);
   Serial.print("Relay State = ");
   Serial.println("ON");
 }
 else
 {
   digitalWrite(relay, LOW);
   Serial.print("Light Relay State = ");
   Serial.println("OFF");
 }
 
 
 
 if(i > 0)
 {
  lcd.setCursor(0,2);
  delay(10);
  lcd.write(tempC);
  lcd.setCursor(0,1);
  lcd.write("Temperature");
 }
 else
 {
  lcd.write("error"); 
 }
 
 
 if(i == 10 || i == 20 || i == 30 || i == 40 || i == 50 || i == 60 || i == 70 || i == 80 || i == 90)
 {
   digitalWrite(buzzer, HIGH);
   delay(100);
   digitalWrite(buzzer, LOW);
   delay(150);  
   digitalWrite(buzzer, HIGH);
   delay(100);
   digitalWrite(buzzer, LOW);
   delay(150);  
   digitalWrite(buzzer, HIGH);
   delay(100);    
   digitalWrite(buzzer, LOW);
   delay(150);  
   digitalWrite(buzzer, HIGH);
   delay(100);    
   digitalWrite(buzzer, LOW); 
   
   for(pos = 90 ; pos < 180; pos += 1)
   {
     servo.write(pos);
     delay(15);
   }
  for(pos = 180; pos >= 90; pos -= 1)
   {
     servo.write(pos);
     delay(15);
   }
 }
  else
 {
     Serial.println("servo pause");
 } 
   Serial.println(" ");

 delay(5000);
   
   
 } 


}

what am i doing wrong?

Try lcd.print instead of write.

soved it, it was an error in the code, i defined a pin as output that i had used before geting the lcd. after deleting that it works fine now, thanks!