I can't work out how to declare a 2 dimensional global array (called a table in gs). I do have a work around but I would have thought there was an easier way of doing it.
Because it needs to be global I have put the following line in gamedef.gs (The name of the array is 'draw')
tab draw;
I want the array to have 20 rows with 5 columns but I only know how to declare the rows which I do at the start of the game.
draw = tab(20);
What do I have to do to get an array of draw(20,5)? draw = tab(20,5) throws an error.
My work around is
draw = tab(20); for (count = 0; count < 20 ; count ++) { draw[count] = {0,0,0,0,0}; }
The reason I need to declare the array rather than generating it on the fly is because the value in any cell can be changed at any time. Not declaring it gives an 'out of bounds' error.