Well, Im stuck,
1) Tm doesnt exist. (Which it does)
2) X or Y are greater than tnumx or tnumy (Which you changed in both loop, right?)
3 Tiles[,] is unallocated, which it isnt
or/and
4) tfrm is unallocated, which it isnt
Post the whole code again, and Ill look, but try to see if you have made an error in any of the four above.
oh and 5) 0 (Zero), isnt a number. errr
tm.tiles[x,y].tfrm=0This would only give the error you have if
1) Tm doesnt exist. (Which it does)
2) X or Y are greater than tnumx or tnumy (Which you changed in both loop, right?)
3 Tiles[,] is unallocated, which it isnt
or/and
4) tfrm is unallocated, which it isnt
Post the whole code again, and Ill look, but try to see if you have made an error in any of the four above.
oh and 5) 0 (Zero), isnt a number. errr