var normalTex : Texture2D;
var hoverTex : Texture2D;
var player_money : Rect = new Rect (0, 0, 0, 0);
static var ShopOn = false;
var InputText : GUIText;
private var inRange = false;
GameObject.FindGameObjectWithTag(“con”).gameObject.GetComponent(“home_script”).SetActive=false;
function OnMouseEnter () {;
guiTexture.texture = hoverTex;
}
function OnMouseExit(){
guiTexture.texture = normalTex;
}
function OnMouseDown(){
if(player_inventory.con_price >= player_inventory.player_money)
{
inRange = true;
InputText.text = "not enough money!";
yield WaitForSeconds(1.5);
{
print ("not enough funds");
}
}
else
if(player_inventory.player_money >= player_inventory.con_price)
{
print ("con bought");
player_inventory.player_money -= 33;
gameObject.Find("con_text").gameObject.GetComponent("home_script").gameObject.SetActive(true);
}
}
the error is in line gameObject.Find(“con_text”).gameObject.GetComponent(“home_script”).gameObject.SetActive(true); does anyone know what is wrong with the script?? i made sure it was spelt right