Mikk- wrote:Okay stupid question but can 2D arrays not have a larger second dimension than the first dimension?
Say for example I have an array defined as test[8][11] - if I then assign index [1][9] I get an out of bounds error..? but if I assign index[1][7] I do not get an error, which is rather strange...Code: Select all
class c_arraytest : actor { int c_testarray[8][11]; override void postbeginplay() { super.postbeginplay(); c_testarray[1][9] = 1; } }
Gutawer wrote:It's kinda weird, but the assignment order for the dimensions and the access order are actually swapped around, you probably want int c_testarray[11][8] instead. That little problem had me annoyed for at least half and hour when I ran into it, lol.