where is the int ?
public float[,] board;
public float GridHeight;
public float GridWidth;
The error is here
board = new float[GridWidth,GridHeight]
where is the int ?
public float[,] board;
public float GridHeight;
public float GridWidth;
The error is here
board = new float[GridWidth,GridHeight]
You are trying to create an Array with a float size, can you imagine an array sized “2.36666”? It is just not possible.
public float[,] board;
public int GridHeight;
public int GridWidth;
Just changing GridHeight and GridWidth to INT will solve it.