SelectionGrid parameters

var strings = new String[10]; strings[0]="hullo"; strings[2]="hi"; strings[6]="hiagain"; GUI.SelectionGrid(Rect(5,Screen.height-160, Screen.width-260, 155), strings, 5);

I am trying to enter the parameters for this function:

static function SelectionGrid (position : Rect, selected : int, texts : string[], xCount : int) : int

I am getting this error:

Assets/MyScripts/CustomGUI.js(60,34): BCE0023: No appropriate version of 'UnityEngine.GUI.SelectionGrid' for the argument list '(UnityEngine.Rect, (String), int)' was found.

What am I doing wrong? I think that I am declaring a string array and passing it to the parameters, so why does it not recognize it as a string[]?

You're only giving it:

Rect, String[], int

but it needs:

Rect, int, String[], int