Hey
I’m working on a TD game, where i have a “ShopController”, and have run into a problem. I’m getting this error:
I have to load the Gun spec from the guns script named “Minigun”,
Some of the ShopController script:
GUI.Box(Rect((Screen.width-200-10),(Screen.height-320-40-110), 200,320), "Store");
if(ShopController.UpgradeActive == true)
{
if(ShopController.SelectedField == "LeftGround")
{
var gunSpec1 = masterscript.LeftSideGroundObject.gameObject.GetComponentInChildren(Minigun);
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+5), 180,25), "Now:",BoldLabel);
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+25), 180,25), "SPS: " + gunSpec1.SPSUp[gunSpec1.gunLevel+1]);
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+45), 180,25), "Damage:");
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+65), 180,25), "Range:");
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+85), 180,25), "Miss:");
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+120+5), 180,25), "Next:",BoldLabel);
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+25+120), 180,25), "SPS:");
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+45+120), 180,25), "Damage:");
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+65+120), 180,25), "Range:");
GUI.Label(Rect((Screen.width-200),(Screen.height-320-120+85+120), 180,25), "Miss:");
if(GUI.Button(Rect((Screen.width-200),(Screen.height-320-120+85+165), 180,30), "Upgrade"))
{}
}
}
And the GameObject var from MasterScript
var LeftSideGroundObject : GameObject;
Can someone help me?