WriteLine

BlitzPlus Forums/BlitzPlus Programming/WriteLine

kfprimm(Posted 2005) [#1]
every time i use the writeline function to add a line to a file it erases everything an writes whatever i told the writeline function to write. How can i make it add a new line of text without erasing evrything else?


CS_TBL(Posted 2005) [#2]
Did you by any chance close the filestream and re-open it every time?

if so: don't do that :)


kfprimm(Posted 2005) [#3]
yeah i did is that the problem?


Snarkbait(Posted 2005) [#4]
Check out my file function tutorial here:
http://home.comcast.net/~tfsanford/FileTutorial.pdf


NetGamer(Posted 2005) [#5]
It is not only a problem, it is very inefficient. Just keep the handle around and reuse it to append to the file until you're done.

Use FileSize and SeekFile to reposition to the end if you need to reopen the file and append to it.