Unknown identifier: 'gui'.

I have done everything to try to display my count down timer on the screen. However, I cannot setup the gui parameter as a variable because it keeps throwing a Null exception error. Therefore, I need to know if I have to set a varaible in my ShowTime function or use public at the begging of the program so it can be access anywhere from the code.

This is the error message.

Unknown identifier: ‘gui’.

var startTime : float;
var timeRemaining : float;

function Start () {
guiText.material.color = Color.white;
startTime = 120.0;

}

function Update () {
if(!isPaused)
{
	DoCountdown();
}

}

function DoCountdown()
{

isPaused=true;
timeRemaining = startTime - Time.time;
ShowTime();

}


function UnpauseClock()
{

isPaused = false;

}

 function ShowTime()
{

var minutes : int;
var seconds : int;
var timeStr : String;

minutes = timeRemaining/60;
seconds = timeRemaining%60;
timeStr = minutes.ToString() + ":";
timeStr += seconds.ToString("D2");



gui.Text.text = timeStr;


}



function TimeIsUp()
{
if(timeRemaining < 0)
{

timeRemaining = 0;
isPaused = true;
TimeIsUp();
}

Debug.Log("Time is up");
}

Hello I’m pretty new to unity, and I’m not sure, but I think gui is supposed to be capitalized GUI (remember identifiers are case sensitive).
Also,
guiText.material.color = Color.white;
should be:
GUI.Text.material.color = Color.white;

Since you’re using the built-in guiText shortcut in your Start function (which references the GUIText component attached to this GameObject - see the Script Reference for Component.guiText) to set the color of the the attached GUIText, it looks like you want to do the same for setting the text, i.e., guiText.text not gui.Text.text

Never mind . I got it. my gui.Text was wrong in the program. I had to set the method to guiText.text.