BCE0044: expecting :, found ‘=’ is an error that I can’t find the answer to. I was wondering if you guys could look over and see?
{
//we’re hit! Spin our character around
transform.Rotate(0,tumbleSpeed * Time.deltaTime,0, Space.World);
tumbleSpeed = tumbleSpeed-decreaseTime;
decreaseTime += decayTime;
}
}
function (hit : ControllerColliderHit) //onTriggerEnter : collider
{
if(hit.gameObject.tag == "fallout");
{
dead = true; //the error is on this line, please help!
//subtract life here
HealthControl.LIVES -= 1;
}
if(hit.gameObject.tag == "enemyProjectile")
{
gotHit = true;
}
}
3 Answers
3
On this line (above the error line)
if(hit.gameObject.tag == "fallout");
There shouldn’t be a semicolon at the end.
ps. when you post code, format it using the button with the ones and zeros to make it easy to read
{
//we're hit! Spin our character around
transform.Rotate(0,tumbleSpeed * Time.deltaTime,0, Space.World);
tumbleSpeed = tumbleSpeed-decreaseTime;
decreaseTime += decayTime;
}
}
function OnControllerColliderHit (hit : ControllerColliderHit)
{
if(hit.gameObject.tag == "fallout")
{ dead = true; //the error is on this line, please help!
//subtract life here
HealthControl.LIVES -= 1;
}
if(hit.gameObject.tag == "enemyProjectile")
{
gotHit = true;
}
}
That should do the trick. 
It’s a sintax error. The problem is one line above:
if(hit.gameObject.tag == “fallout”); ← remove this “;”
downvoted for posted the same question again
– Graham-DunnettIs this person creating new accounts whenever his/her last account gets negative karma?
– Dreamblur