Yoko
http://forum.yoko.com.ua/

File append
http://forum.yoko.com.ua/viewtopic.php?f=4&t=14245
Page 1 of 1

Author:  nexuser [ 2008-12-31 15:53:29 ]
Post subject:  File append

Is it possible to append data to a file, instead of creating new file?

Something like

Code:
    var s=0,k,f=file("file.dat")

    f.Open()

    f.Append()

    f.Writeln("Hello")
    f.Close()


I tried to open a file, read it until end but i can't write past...

Code:
    var s=0,k,f=file("mining.dat")

    f.Open()

    while not f.eof() and not fatal error
       
        k=f.readnumber()
       
        if not fatal error then
            dbgmsg(s)
        endif
       
    wend

    f.Writeln(' ' + str(OreT)+' '+str(OreX)+' '+str(OreY)+' '+str(OreZ))
    f.Close()


Injection window says "Line 808: Runtime error - File read error"

Inj version 805[/code]

Author:  nexuser [ 2008-12-31 20:07:38 ]
Post subject: 

It seems Injection does not like "\n" or "\r" terminated files...

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/