WriteLine

Discuss any general programming issues here
Post Reply
Splurge
Posts: 3
Joined: Sun Feb 14, 2010 5:43 pm

WriteLine

Post by Splurge »

Having an issue with writing to a file. When I write a new line it is overwriting the entire contents. Just a simple:

OpenFile(1,S:test,#MODE_WRITE)
Seek(1,#EOF)
WriteLine(1,log$)

I must be missing something...
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: WriteLine

Post by Allanon »

Change #EOF with

EOF(1)

:D
Splurge
Posts: 3
Joined: Sun Feb 14, 2010 5:43 pm

Re: WriteLine

Post by Splurge »

Thanks, but it still doesn't seem to work.
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WriteLine

Post by airsoftsoftwair »

You have to use #MODE_READWRITE. #MODE_WRITE will always erase the old file.
Splurge
Posts: 3
Joined: Sun Feb 14, 2010 5:43 pm

Re: WriteLine

Post by Splurge »

Andreas wrote:You have to use #MODE_READWRITE. #MODE_WRITE will always erase the old file.
Thanks, works great now!
Post Reply