I don’t know why I’m experiencing so much trouble with this, but I would like to have an array that basically represents a layer number and x,y coordinates so I could essentially say,
int i = array[layer,x,y] and get the corrisponding value per layer. I create the array..
int[,,] myarray
…initialize it
myarray = new int[0,width, height];
…and it blows up when try and grab a value.
int n = myarray[0,1,1]
What am I missing?
You are initializing an array with 0 as a length. Use 1: