Help! Why doesn't this work? GUI/Static vars Help! Javascript

This is my script, I’m getting errors. For some reason I only seem to get this error when I am using static vars rather than regular ones

static var score : int = 10;
function OnGUI()
{
    GUI.Label(Rect(Screen.width/5-100,Screen.height/5-90,300,30), score);
}

Try this:

GUI.Label(Rect(Screen.width/5-100,Screen.height/5-90,300,30), score.ToString());
// or
GUI.Label(Rect(Screen.width/5-100,Screen.height/5-90,300,30), "" + score);