I'm want to write a bunch of data (6 integers and 1 string) to the end of a text file. It would be prefferable if they were all on the same line. I can't figure out how to do this.
I know how to write my data to a file
and i know how to open the old file and get the size of it.Code:filenum:= RewriteFile(filepath,false); WriteFilestring(filenum,combo); WriteFileInt(filenum,face1); WriteFileInt(filenum,face2); WriteFileInt(filenum,face3); WriteFileInt(filenum,face4); WriteFileInt(filenum,face5); WriteFileInt(filenum,face6); CloseFile(filenum);
but if i use the ReadFileString command it wants a integer as filesize and the filesize command returns a extended. otherwise i would use this codeCode:oldnum := OpenFile('C:\itegrate\programming\Scar\Scripts\cube\anal\cubelevel' + inttostr(cubelevel) + '.txt', false) size:= filesize(oldnum); CloseFile(oldnum);
^doesn't workCode:oldnum := OpenFile('C:\itegrate\programming\Scar\Scripts\cube\anal\cubelevel' + inttostr(cubelevel) + '.txt', false) size:= filesize(oldnum); ReadFileString(oldnum, oldinfo,size); CloseFile(oldnum);





Reply With Quote





