health script will not work

well i have been making this health script and i get this error, i am fairly new to unity javascript

BCE0044: expecting (, found 'Die'.

and here is the health script,

var curHealth : int = 100;
var maxHealth : int = 100;
var Enemy : gameobject;
 
function Start () {
 }
function Update () {
 
 
        if(curHealth < 0 ) {
                curHealth = 0;
        }
 
        if(curHealth > 100) {
                curHealth = 100;
        }
 
        if(col.gameObject.name == "Zombie"){
                curHealth -= 10;
        }
        
        {
        if (curHealth <= 0)
          Die();
}      
        function Die(){
            Destroy(Enemy);
}       

}

var curHealth : int = 100;
var maxHealth : int = 100;
var Enemy : gameobject;

    function Start () {
    }
    function Update () {
     
     
    if(curHealth < 0 ) {
    curHealth = 0;
    }
     
    if(curHealth > 100) {
    curHealth = 100;
    }
     
    if(col.gameObject.name == "Zombie"){
    curHealth -= 10;
    }
     
    {
    if (curHealth <= 0)
    Die();
    }
 
    }
   function Die(){
    Destroy(Enemy);
    }

Your function Die() was in another function. It has to be separate.

var curHealth : int = 100;
var maxHealth : int = 100;
var Enemy : GameObject;

    function Start () {
    }
    function Update () {
 
 
    if(curHealth < 0 ) {
    curHealth = 0;
    }
 
    if(curHealth > 100) {
    curHealth = 100;
    }
 
    if(col.gameObject.name == "Zombie"){
    curHealth -= 10;
    }
 
    {
    if (curHealth <= 0)
    Die();
    }
 
    }
   function Die(){
    Destroy(Enemy);
    }

GameObject, not gameobject.