Trouble Writing Multiple Lines

Blitz3D Forums/Blitz3D Beginners Area/Trouble Writing Multiple Lines

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi all,
I'm trying to create a program that writes multiple lines of input to a file. However, for some reason, so far I've only been able to write the last line (which is "Close", because that's what stops the loop) to a file. How can I set this up so that that dosen't happen without using hundreds of thousands of variables?
Sorry... I thought I posted it. Here you go:
Graphics 1024,768
save$ = Input ("Under what name do you want this log saved?")
Writef$ = Input ("Ready.")
Repeat
mainfile$ = Input ("")
rcon = WriteFile("C:\temp\Test Docs"+save$+".con")
Until mainfile$ = "Close"
.writer
WriteLine (rcon,mainfile$)
CloseFile rcon
WaitKey 
End 

Thanks for you help.