- Home /
Question by
FLewis4 · Mar 03, 2013 at 05:28 AM ·
enemydamagedeathenemy damage
I'm trying to set up a death script for enemies
Hey there, could someone please check my code and let me know where I'm making errors.
I'm having issues with: Assets/EnemyLogic.js(9,23): BCE0044: expecting :, found ';' In reference to this code:
#pragma strict
var Health = 100;
function Update ()
{
if(Health <= 0);
{
Dead();
}
}
function ApplyDamage (TheDamage : int)
{
Health -= TheDamage;
}
function Dead()
{
Destroy (gameObject);
}
Comment