i always get an invalid array error when saving an array to a file with a type that i created. Here is a piece of code to show you what i mean:
type one
a as integer
b as string
endtype
dim arrayone(6) as one
arrayone(1).a=1
arrayone(1).b="1adsdasd"
arrayone(2).a=2
arrayone(2).b="2dssad"
arrayone(3).a=4
arrayone(3).b="4gfdgdfg"
arrayone(4).a=3
arrayone(4).b="3dgfgdf"
arrayone(5).a=5
arrayone(5).b="5gdfgfdg"
arrayone(6).a=6
arrayone(6).b="6dfgfdxc"
do
if shiftkey()=1
if file exist("data.book")=1 then delete file "data.book"
open to write 2,"data.book"
save array "data.book",arrayone(6)
close file 2
print "saving"
wait 1000
endif
loop
why do i get this problem and how can it be addressed?
thanks for your help,
Dan