cant add script

when i add javascript to anything in my hierarchy from the project panel, unity gives me an error

" Can’t add script Script NewBehaviourScript has not finished compilation yet. Please wait until compilation of the script has finished and try again."

if i make a new javascript and leave it empty i get them same error

what is the problem?

here is what it will not let me add

private var dead = false;

function OnControllerColliderHit(hit : ControllerColliderHit)
{
	if(hit.gameObject.tag == "fallout")
	{
		dead = true;
	}
}

function Update () {
}

Do you have any error messages from other scripts? New scripts can not be compiled before all scripts can successfully be compiled.

2 areas I would look at.

What’s the name of this script. I don’t mean to come across as Sm@rt A**ed but, Sometimes the simplest answer is best. You don’t have two scripts named the same do you?

Next:

private var dead = false; 

function OnControllerColliderHit(hit : ControllerColliderHit) 
{ 
   if(hit.gameObject.tag == "fallout") 
   { 
      dead = true; 
   } 
} 
// Delete this. Try it without a function update. 
// I think I read that update is the equivilent
// of main, if so, you only want one throughout
// your code. 
/*
function Update () { 
}

*/

Wait, wait, is Update ← supposed to be capitalized or is it supposed to be:

update
{

}

The Update message is supposed to be with an upper-case U.

LOL yer FAST! I went and looked it up, and came back to delete my post on questioning the case of Update.

Bleh my incompetence will live on in perpetuity!

Jim Cullen

thanks for the replays yes i have a shed load of errors, i am working through them now

cheers Ben