string to int : Input string was not in the correct format

hi. can someone tell me please why this doesnt work.
and if there might be other solutions?

function findeFrage(_name:String){
// GameObject.name is between "10" and "20"
	if(_name!=actualName){
		actualName = _name;
		var number:String = (actualName[0]+""+actualName[1]);
		print(number);


		var yourInt;
		yourInt = parseInt(actualName);
		score = yourInt;

		return score;
	}
	
}

// errorMSG
if(GUI.Button (Rect (moX+20, (Screen.height-moY)-20, buttonBreite, 20),fragenArray[score])){
}
// FormatException: Input string was not in the correct format
System.Int32.Parse (System.String s) 
UnityScript.Lang.UnityBuiltins.parseInt (System.String value)

thank you.

Hello.

Your problem most probably lies in this line:

      yourInt = parseInt(actualName);

What you’re doing is that you are trying to set yourInt to actualName. You probably wanted to do this:
(Taken that the first 2 chars in the string are ints.)

      yourInt = parseInt(number);

Also make sure your function has the correct return value.

function findeFrage(_name:String):String{

My java is a bit rusty, but i think that’d be correct.