Scripting error

Hello. I got this script this thread that I started. I am trying to use it to control the highscores in my game, but I keep getting this error ""Assets/NewBehaviourScript.js(3,19): BCE0018: The name 'string' does not denote a valid type ('not found'). Did you mean 'System.Runtime.CompilerServices.StrongBox'?" " what is wrong? Thanks

function Update () {
    var key : string = System.String.Format("{0}{1}{2}_score", Arcade.ModeInt, Arcade.DifficultyInt, Arcade.CharacterInt);
PlayerPrefs.SetString(key, Stats.Score);

string -> String