I would like to find the index of where a map tile was stored from a map[a,b] type array;
map[1,1] = tile1
map[1,2] = tile2
map[1,3] = tile3
map[2,1] = tile4
map[2,2] = tile5
map[2,3] = tile6
map[3,1] = tile7
map[3,2] = tile8
map[3,3] = tile9
I would like to use map.find(tile1....9), but that gives a syntax error. It apparently wants something like map[n].find(object_ID) instead.
Quote: "main.agc:2151: error: Cannot search arrays of arrays, use more dimensions to search a sub array"
for m = 1 to mapsizex-1
for n = 1 to mapsizey-1
if map[m,n] = tile1....9
mposindat = m
nposindat = n
endif
next n
next m
...now map[mposindat,nposindat] of course does return the correct tile object ID with the above work-around doing the search myself. But am I missing something, can we not use .find for multidimensional arrays??