gui text script help

i want to make a GUI that tells me what a Variable is in another script i am currently using

function OnGUI () { GUI.Box (Rect (0,0,100,50), itemvar.item); }

and i am getting an error no appropriate version of Unity Engine.GUI.box for argument list '(unityengine.rect,int)'was found

could someone tell me what i am doing wrong and tell me how to fix it

This will work for you:

function OnGUI () { GUI.Box (Rect (0,0,100,50), ""+itemvar.item); }

""+int will create a string from your int.