Hi there im getting the following errors in my script:
Assets/My Scripts/Character_Controller.js(98,61): BCE0043: Unexpected token: ;.
Assets/My Scripts/Character_Controller.js(100,9): BCE0043: Unexpected token: if.
Assets/My Scripts/Character_Controller.js(98,61): BCE0043: Unexpected token: ;.
And below is my script:
function OnControllerColliderHit (hit:ControllerColliderHit);
{
if(hit.gameObject.tag=="Health");
{
HealthBar.health +=20;
Destroy(hit.gameObject);
}
if(hit.gameObject.tag=="SkeleSword");
{
HealthBar.health -=5;
}
if(hit.gameObject.tag=="ScorpClaw" && !animation.IsPlaying"ScorpClaw"));
{
HealthBar.health -=5;
} else HealthBar.Health ==0;
}
if(hit.gameObject.tag=="ScorpSting" && animation.IsPlaying("Blocking"));
{
HealthBar.health -=2;
} else HealthBar.health -=6;
}
I can’t see the error myself although I know it will be a simple one but can anyone point them out to me would be a great help thanks!
GDM