How can i link a var to a gui?

Hi i need to know how to use a variable in a script and copy that variable in a gui script.
In other words i need to know how i can link the var to a gui text.

You would reference that variable in the line for the string.

SomeScript

public var valueVariable:float;

GUIScript

private var someScript:SomeScript;

function Start()
{
    someScript=transform.GetComponent(SomeScript);
}
function OnGUI()
{
    GUI.Label(rect,someScript.valueVariable.ToString("f2"));
}

ok thanks but it gives me this

BCE0023: No appropriate version of ‘UnityEngine.GUI.Label’ for the argument list ‘(System.Type, String)’ was found.

OH And thanks so much for the help guys!