Hi, all! I have three GUI Boxes in the OnGUI function. However, whenever I add the third into the code, I get the following error, repeated three times..
NullReferenceException: Object reference not set to an instance of an object Boo.Lang.Runtime.RuntimeServices.CheckNumericPromotion (IConvertible convertible)
What can I do to fix this? My code is as follows.
var skin : GUISkin;
var skin2 : GUISkin;
function OnGUI() {
GUI.skin = skin;
GUI.Box (Rect (10,10,Health.health * 3,30), "Health");
GUI.skin = skin2;
GUI.Box (Rect (10,40,Health.mana * 3,20), "Mana");
GUI.skin = skin2;
GUI.Box (Rect (10, 70,Experience.XP,20),"Experience");
}