Quick question, when you use -- and ++ when accessing an array, is it also decrementing or incrementing the value?
(Example)
dungeon[row--][col][depth].connected = TRUE;
dungeon[row][col][depth].connections[dungeon[row][col][depth].numConnections][row--][col] = TRUE;
What I'm trying to do is access the section one row above (physically above, so the row has to decrease) the current row.
What the debugger says I'm doing is that the row variable (the one I'm decrementing) starts at 1 (before this code block starts), goes to 0 (after the first line), then goes to -2 (after the second line). Then, of course, that means I'm trying to access an array with a negative value, which is producing a BAD_ACCESS error.