Changing 3d text with key

I want to change my text when I press a button, but it goes strait to the last text. I don’t know how to pause the process between button pressing, so it keeps going to the last. Help please.

var t : TextMesh;
private var i : float = 1;

function Start () {

}

function Update () {

if (Input.GetKeyDown(KeyCode.E)){
if(i== 1){
t.text = “hello”;
i=2;
}
if(i== 2){
t.text = “something”;
i=3;
}
if(i== 3){
t.text = “something else”;

}

}

You should do something like this:

function Update () 
{

     if (Input.GetKeyDown(KeyCode.E))
     {
          i++; //this will add +1 value for the variable i. Its the same thing as i = i + 1;
     }
     if(i== 1){
          t.text = "hello";
     }
     if(i== 2){
          t.text = "something";
     }
     if(i== 3){
          t.text = "something else";
     }

}

Thank you so much, it worked perfectly. I was expecting something like that, but I don’t dominate java yet. I learned a lot, thanks