Messed up writestring?

Blitz3D Forums/Blitz3D Beginners Area/Messed up writestring?

Guy Fawkes(Posted 2011) [#1]
How do i convert:



to



?

Writestring returns the above (70 213 221 193 38661232 38661232 38661232 38661232 1 0 Media\Wood.JPG)

and i need it to return the list of things i gave under that :/

Thanks! :)

Last edited 2011


Yasha(Posted 2011) [#2]
WriteString writes in Blitz's internal format, where the string data is preceded by a four-byte length and has no terminator character. This is intended for writing to binary data dumps rather than human-readable text files.

WriteLine writes a string in the human-readable way: just the string's characters, followed by a CRLF line-ending. To read it from the file, you use ReadLine instead of ReadString (note that ReadLine doesn't move "backwards" from the middle of a line, if you've moved the file pointer using any other operation - you just get half a line, so be consistent in your reads and writes).


Guy Fawkes(Posted 2011) [#3]
Thanks Yasha, works great! :D