This code fails miserably (not sure why)
READUBYTE 1, TileMap[x][y]
However this is basically the same but works flawlessly.
LOCAL MapData%
READUBYTE 1, MapData%
TileMap[x][y] = MapData%
That could be because TileMap is not an integer...
Yup you're right thanks, was tearing my hair out :D