Hi,
The CHECKLIST QUANTITY() command is used after a proper 'PERFORM CHECKLIST.....' command. There are several things that you use this command for. Some examples:
PERFORM CHECKLIST FOR DISPLAY MODES
PERFORM CHECKLIST FOR GRAPHICS CARDS
PERFORM CHECKLIST FOR FONTS
After you use one of the above commands, then you use CHECKLIST QUANTITY() to determine how many results there are. What you are doing is not what CHECKLIST QUANTITY is intended for.
After you dimension an array, you would store data in that array (examples are: numbers, characters, strings, etc). Then to write the data from the array to your hard drive, you check to see if the file exists. If it does, you would want to delete it so you can write the new data. You then open the file to write and then use a for-next loop to write the contents of the array. Once everything is written, you close the file.
An array such as checklist$(170), would typically be a string array. You could say checklist$(1) = "Chris": checklist$(7) = "smerf" etc.
Here is a way you can do it:
dim checklist$(170)
checklist$(1) = "Chris" : checklist$(7) = "smerf"
a$ = "smerf_cl.txt"
if file exist(a$) = 1
delete file a$
endif
open to write 1,a$
for i = 1 to 170
write string 1,checklist$(i)
next i
close file 1
text 200,200,"File written" : wait 1200 : end
Run the code and it should write the file to your hard drive in the same place where you save the project and source files.
To load it back in you could do the following:
dim checklist$(170)
a$ = "smerf_cl.txt"
if file exist(a$) = 1
open to read 1,a$
for i = 1 to 170
read string 1,checklist$(i)
if checklist$(i) <>"" then print checklist$(i) + " "
next i
close file 1
endif
This code prints any array element that is not a null string(i.e. ""), just to demonstrate to you that they are there.
I hope this is helpful and was what you were interested in. If you need anything else, just post.
So many games to code.....so little time.