Pop-Up GUI

Hello. I wanted to make this little feature when you press “b” a pop-up book appears and you can view different tabs with different textures and information, then when you press b again it closes the book. I haven’t done anything like a pop-up before so I need some help. This is all I got so far, and I’m getting an error that says “Expressions in statements must only be executed for their side-effects.”

#pragma strict

private var guiShow : boolean = false;

var riddle : Texture;

function Update ()
{
	if (Input.GetKey("c"))
	{
		OpenBook;
	}
}

function OpenBook()
{
	if(guiShow == true)
	{
		GUI.DrawTexture(Rect(Screen.width / 4.5, Screen.height / 4, 1024, 512), riddle);
	}
}

I would also like to mention that a new GUI system is being released with the next patch of Unity, so you might want to save the GUI work until then.

In general you should NOT paraphrase error messages but instead give the comnplete message as Unity displays it. There is important information in it, like line numbers.

In this case however my guess is that its this…

 OpenBook;

When calling a function you must have () like this…

 OpenBook();