.dat files

Blitz3D Forums/Blitz3D Beginners Area/.dat files

ingenium(Posted 2007) [#1]
file = WriteFile("debug.dat")
WriteString(file,1)
CloseFile(file)

In debug.dat i find "  1" instead of "1".
why?


CodeOrc(Posted 2007) [#2]
I dunno about using an absolute value in the WriteString(x,x) command because I use dynamic variables for all my high score saves and loads.

Maybe b3d is seeing numbers in 10's, 1000's like "01" instead of "1" ?

But, I am new to using this stuff, so not sure.


GfK(Posted 2007) [#3]
WriteString writes a four-byte header containing the length of the string (and some other info, if I recall).

It clearly mentions this in the documentation.


b32(Posted 2007) [#4]
I think then, you could better use WriteLine instead.


ingenium(Posted 2007) [#5]
Ok, roger that. Thank you.