Grabbing Numeric Strings to use as data
Posted: Sun Jul 20, 2003 3:08 am
I am trying to read a string of numbers from a file, to use as numeric variables, I can't use ReadString() and ReadWord(), ReadLong(), ReadFloat() etc, all return extremely high values. See code below
The file has 2 lines they are :
thats it. when I get this right, there will be more settings in the file, this is just so the program can save the settings later on.
thanks for any help....
Code: Select all
if FileSize("screensettings.txt") = -1
width=800
height=600
else
ReadFile(0, "screensettings.txt")
FileSeek(1)
width=ReadWord()
FileSeek(2)
height=ReadWord()
Endif
Code: Select all
800
600
thanks for any help....