Store data into a binary file

BlitzMax Forums/BlitzMax Beginners Area/Store data into a binary file

gameshastra(Posted 2007) [#1]
Hi,

can anyone explain me how can i store data into a binary file.....

Thank u...


CS_TBL(Posted 2007) [#2]
local fileout:tstream=writefile("c:\bla.dat")
if fileout
  writebyte fileout,0
  writeshort fileout,1000
  writeint fileout,100000
  writelong fileout,1000000000
  writefloat fileout,12.34
  writedouble fileout,12.346789123
  closefile fileout
endif


This writes all the stuff after eachother. For loading use readfile, readbyte, readshort etc. See the manual.


gameshastra(Posted 2007) [#3]
thank u