hmm thats the problem
I suggest you getting some tutorials about file commands.
try doing this:
open a 'new project', and compile this:
Open To Write 1,"C:/mapdata.txt"
Write File 1,1
Write File 1,1
Write File 1,1
Write File 1,1
Write File 1,1
Write File 1,2
Write File 1,2
Write File 1,1
Write File 1,1
Write File 1,2
Write File 1,2
Write File 1,1
Write File 1,1
Write File 1,1
Write File 1,1
Write File 1,1
Close File 1
Now go to your C drive and use that mapdata.txt and see if that works
If you compiled that code above, open the txt file and see whats inside. Thats why it didnt work.. your code is reading the first 4 bytes and assuming its a integer, in your case, the letter "d" from "data"
Yep.. those datas are not meant to be there
In the notepad, we can only write data as 'strings' (((i think))), so if you want to write integers you'll need to do it this way
[edit, note: ]
"read string" ==> gets data as string
"read file" ==> gets data as integer
[/edit :p]
ps: bad english?