i do believe READ STRING has a limit of 255 characters (probably something they forgot to change.. should be a bug). however that booklet is wrong in saying DBP has a limit of 255 characters in a string.
you can make a read string function using the other file access commands. or, you could skip strings altogether and just use numbers like with READ/WRITE LONG.
function ReadLongString$(file)
s$=""
while(file end(file)=0)
read byte file,a
if a=13 then exit
s$=s$+chr$(a)
endwhile
`read the extra junk 10 character at the end of line
read byte file,a
endfunction s$
there. you can now read strings longer than 255 characters from a file.
however let me guess -- you're reading a string, then parsing the string (going thru it character by character and decoding it) to make the level, right? if you use READ BYTE instead, you can skip the whole parsing thing altoghether.
function LoadLevel(file$)
open to read 1,file$
while(file end(1)=0)
do
read btye 1,a
if a=13 the exit
b$=chr$(a)
`now look at that - you've got the character that represents and object!
` you can load your obejct here and place it.
loop
`read the junk character 10 at the end of line
read byte 1,a
endwhile
close file 1
endfunction
THAT, my friend, is file access.
athlon xp 2000+ | radeon 9500 pro 128mb | 512MB DDR | winXP pro | DBP 5.1b | B3D 1.85 | VC++ 6
predicted DBP P6 release date: March 28, 2004
DBP has made me bitter.