What am I doing wrong with my life script?

Hi. I am making a first person shooter and want to be able to make the player have life. The script should work, but it doesn't. I can't figure out what I am doing wrong.

var Life : int = 0;
var GameOverLevel : String;
var Damage = 5;
var EnemyProjectile : Transform;

function OnCollisionEnter(myCollider : Collider)
{
    if(myCollider.gameObject.name == (EnemyProjectile))
    {
        Life -= Damage;
    }
}
function OnGUI()
{
    GUI.Label (Rect (25, 25, 100, 30), "Life: "+Life);
}

function update()
{   
    if (Life == 0)
    {
        Application.LoadLevel (GameOverLevel);
    }
}

you're saying to automatically game-over since you're lives are zero already. just make your lives 10 or something.

Edit: in the oncollisionenter function you need to make the parameter. :Collision, not :Collider for it to work. Make sure an object is a rigidbody for that function to even work!

also, if the problem is that the level isn't loading, you didn't add it to the build settings menu. file > build settings, just drag your scene file to the build settings, and to open it from the game,

`Application.LoadLevel("GameOverLevel");` //just make sure the name of your level is the same as you wrote it in the LoadLevel script.