There are two down-sides to using Save Array (ignoring the fact that in the past it has occasionally failed to work for me).
The first is that you can only save a single array in a file. If you have multiple arrays and other data, you can't save them in a single file.
The second is that other than using Load Array, you can't easily check what you have written to a file. If Load Array doesn't work then there's no way of knowing whether the Save or the Load part is the problem.
I would suggest that at first, you use the same method you are using, but use WRITE STRING for every piece of data.
You can then open up the file with Windows Notepad and check to see if the data matches with what your loading routine expects to be there. At the moment, I tend to agree with what latch said.
So, your save routine would be:
Open To Write 1,"newMap.txt"
`Saving the Array's
For SaveNo=1 to 850
Write String 1,Str$(ImgNo(SaveNo))
Write String 1,Str$(xCoords(SaveNo))
Write String 1,Str$(yCoords(SaveNo))
Write String 1,Str$(tileNo(SaveNo))
Next SaveNo
Close File 1
As an aside, I would be tempted to instead use:
Open To Write 1,"newMap.txt"
`Saving the Array's
For SaveNo=1 to 850
Write String 1,Str$(ImgNo(SaveNo))
Next SaveNo
For SaveNo=1 to 850
Write String 1,Str$(xCoords(SaveNo))
Next SaveNo
For SaveNo=1 to 850
Write String 1,Str$(yCoords(SaveNo))
Next SaveNo
For SaveNo=1 to 850
Write String 1,Str$(tileNo(SaveNo))
Next SaveNo
Close File 1
but the end result is the same - it's just a matter of preference. The only advantage is that all the data of the same type is written together in blocks.
You can then add comments before each block stating what the block of data is:
Open To Write 1,"newMap.txt"
`Saving the Array's
Write String 1,"; ***************************************"
Write String 1,"; Section 1: 850 Image Numbers (Integers)"
Write String 1,"; ***************************************"
For SaveNo=1 to 850
Write String 1,Str$(ImgNo(SaveNo))
Next SaveNo
Write String 1,";"
Write String 1,"; ***************************************"
Write String 1,"; Section 2: 850 xCoords (Integers) "
Write String 1,"; ***************************************"
For SaveNo=1 to 850
Write String 1,Str$(xCoords(SaveNo))
Next SaveNo
Write String 1,";"
Write String 1,"; ***************************************"
Write String 1,"; Section 3: 850 yCoords (Integers) "
Write String 1,"; ***************************************"
For SaveNo=1 to 850
Write String 1,Str$(yCoords(SaveNo))
Next SaveNo
Write String 1,";"
Write String 1,"; ***************************************"
Write String 1,"; Section 4: 850 tileNo (Integers) "
Write String 1,"; ***************************************"
For SaveNo=1 to 850
Write String 1,Str$(tileNo(SaveNo))
Next SaveNo
Close File 1
OK, it's longer, but if it works or helps solve the problem...
To read the file back in you would use something like:
Open To Read 1,"newMap.txt"
`Saving the Array's
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
For SaveNo=1 to 850
Read String 1,T$: ImgNo(SaveNo)=VAL(T$)
Next SaveNo
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
For SaveNo=1 to 850
Read String 1,T$: xCoords(SaveNo)=VAL(T$)
Next SaveNo
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
For SaveNo=1 to 850
Read String 1,T$: yCoords(SaveNo)=VAL(T$)
Next SaveNo
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
Read String 1,T$: Rem Read and ignore comment
For SaveNo=1 to 850
Read String 1,T$: tileNo(SaveNo)=VAL(T$)
Next SaveNo
Close File 1
Once it's all working, you can remove the comments.
To be honest, I load and save all my data files this way as it's no slower and much quicker to track down any problems which occur.
TDK_Man