#pragma strict
private var guiHealth : GameObject;
private var healthBarScript: HealthBarScript;
function Start() {
guiHealth = GameObject.Find(“GUI Health”);
healthBarScript = guiHealth.GetComponent(“HealthBarScript”);
healthBarScript.healthWidth = 199;
}
function Update() {
reduceHealth();
}
function reduceHealth() {
if(healthBarScript.healthWidth > -8; {
healthBarScript.healthWidth = healthBarScript.healthWidth - 1;
}
}
Unity tells me: Assets/playerhealth.js(18,38): BCE0044: expecting ), found ‘;’.
I can’t seem to find the problem. I am a little new to unity scripting. I appreciate any help.