Hi, I’m pretty new to Defold and Lua - I keep running into this error when attempting to index the very first value (setting self.board[i][j]) - i’ve tried to see if any indexes or even values are nil at any point (via my 6 print functions sorry) but nothing is.
This code works perfectly fine when I set the index to [y], generating a full grid with the rows and columns specified, but I don’t know why it doesn’t with i and j because they are never nil (as far as I’m aware - they both start at 1) - what’s wrong here and how do I fix this ??
the function:
output & error message (stops at the first instance):
Any help would be much appreciated!!