Noob needs help : "expecting }, found " "

var myTimer : float = 5.0;

function Update(){
	if (myTimer >=0) {
		(myTimer (Time.deltaTime));
		
	if(myTimer <=0){
		Debug.Log ("GAME OVER");
	}
}

What did I do wrong? :S

Youre missing a “{”:

var myTimer : float = 5.0;

function Update(){
    if (myTimer >=0) {
        myTimer (Time.deltaTime));
    } // this is what you were missing

    if (myTimer >= 0) {
        Debug.Log("GAME OVER");
    }
}

Everytime you open a bracket, you must close it :smiley:

Hey there. Just what it sounds like, your missing a “}”. But i assume you are counting to zero so if the timer is not yet zero (the first case) you want to subtract the time since the last frame from the timer that would be like this:

var myTimer : float = 5.0;
 
function Update(){
    if (myTimer >0) {
       myTimer = myTimer - Time.deltaTime;
	}
    if(myTimer <=0){
       Debug.Log ("GAME OVER");
    }
}