Hello World. I get an invalid rank specifier at line 22 when i try to run this C# Script. Its a multidimentional Array.

using UnityEngine;
using System.Collections;

public class GridHolder : MonoBehaviour
{
//public GameObject CubeToSpawn;

public GameObject plane;
public int width;
public int height;

private GameObject [,] grid  = new GameObject [10][10];

void Awake () 
{

	for(int x=0; x<width; x++)
	{
		for(int z=0; z<height; z++)
		{
			//Forcing object to be of type gameobject
			GameObject gridPlane = (GameObject)Instantiate(plane);
			gridPlane.transform.position =new Vector3 (gridPlane.transform.position.x + x,gridPlane.transform.position.y,
			                                           gridPlane.transform.position.z +z);

			grid[x,z]=gridPlane;

		}

	}

}

void OnGui()
{
	if(GUI.Button(new Rect(10,10,150,100),"Delete grid [3][3]"))
	{
		Destroy(grid[3][3]); 

	}
}

void Update ()
{

}

}

Posting the error would be nice to, but try GameObject. Lists would be better, expecially when you just create an class structure that holds two gameobjects.

This line:

private GameObject [,] grid  = new GameObject [10][10];

should be:

private GameObject [,] grid  = new GameObject [10,10];