Trying to convert AutoType GUI Text script to Text mesh (3D text)

(Sorry, maybe my English isn´t perfect)

Hi, I use the AutoType script, but I want to use it for TextMesh, not for GUI Text.

This is the result:

var currentPosition : int = 0;
var Delay : float = 0.1;  // 10 characters per sec.
var Text : String = "";
var additionalLines : String[];
 
function WriteText(aText : String) {
    TextMesh.text = "";
    currentPosition = 0;
    Text = aText;
}
 
function Start(){
    for ( var S : String in additionalLines )
        Text += "

" + S;
while (true){
if (currentPosition < Text.Length)
TextMesh.text += Text[currentPosition++];
yield WaitForSeconds (Delay);
}
}

But I get these two errors:
alt text

Can you explain what´s wrong?

Thanks in advance.