I'm doing something wrong here. I'm working with saving matrix tiles to an array and then
to a file and loading them, I have read the posts in the forums but they don't seem to work for me. the following code is the method
I'm trying to use. it seems that the array gets saved fine but upon
loading I get an error of illegal tile number.
[/code]DIM tex(80,60)
do
IF mouseclick()=1
set matrix tile 1,xpos,ypos,imnum#
tex(xpos,ypos) = imnum#
endif
loop
function save_textures()
SAVE ARRAY file$+".mtrl",tex(0)
endfunction
function load_textures()
load array texfile$+".mtrl",tex(0)
For xpos= 0 to collums
For ypos= 0 to rows
set Matrix tile 1,xpos,ypos,tex(xpos,ypos)
Next ypos
next xpos
endfunction[code]
does anyone know what I'm doing wrong here?