WriteLine

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

WriteLine

Post by Splurge » Thu Mar 03, 2011 4:57 pm

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: 461
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: WriteLine

Post by Allanon » Thu Mar 03, 2011 9:14 pm

Change #EOF with

EOF(1)

:D
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

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

Re: WriteLine

Post by Splurge » Fri Mar 04, 2011 2:25 pm

Thanks, but it still doesn't seem to work.

User avatar
airsoftsoftwair
Posts: 3110
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: WriteLine

Post by airsoftsoftwair » Sat Mar 05, 2011 12:09 am

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 » Mon Mar 07, 2011 2:27 pm

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

Post Reply