Gives this error - Flashlight.js(15,37): BCE0005: Unknown identifier: ‘hBarImage’.
function OnGUI {
GUI.BeginGroup( Rect(40, 10, 218 * (health/10.0) +35 , 90) );
GUI.Label( Rect(0, 0, 272, 90), hBarImage );
GUI.EndGroup();
}
Gives this error - Flashlight.js(15,37): BCE0005: Unknown identifier: ‘hBarImage’.
function OnGUI {
GUI.BeginGroup( Rect(40, 10, 218 * (health/10.0) +35 , 90) );
GUI.Label( Rect(0, 0, 272, 90), hBarImage );
GUI.EndGroup();
}
You have not define hBarImage at least not that I can see in this code fragment. You need to put
var hBarImage : Texture;
at the top of the script and then set it to something.