- Home /
Question by
ReedMon · Nov 10, 2012 at 12:33 AM ·
fixidentifier
Can someone fix this coding?
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();
}
Comment
Best Answer
Answer by DaveA · Nov 10, 2012 at 12:49 AM
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220613083627im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
NullReferenceException on ThirdPersonControlller 1 Answer
Do parent tags always affect children? 1 Answer
Unity - Avatar problem? 0 Answers
Fix Swipe problem 1 Answer
mass placed trees dont collide 1 Answer