Yeah, it does seem like TZipper can't read the save file. I've sent an executable that tests the path/file name to the user with the issue.
Yeah, it does seem like TZipper can't read the save file. I've sent an executable that tests the path/file name to the user with the issue.
Laserbrain Studios - Currently developing Hidden Asset!
Ascii Sector - Real-time roguelike in space!
The report back is that my code can definitely access the .dat file with FileExists(), so that's not it.
Laserbrain Studios - Currently developing Hidden Asset!
Ascii Sector - Real-time roguelike in space!
Man, this sure is weird. His system can compress a file that already exists, but if the code has to create the file first, it doesn't work.
The above code creates saves/1.zip and the zip archive shows the correct size of 1.dat inside it. But unzipping that file shows that its size is 0.Code:PROGRAM compressiontest; USES sdl, zipper; VAR Zip : TZipper; FileName : String; SaveFile : Text; I : Byte; BEGIN FileName := '1'; Assign(SaveFile, 'saves/' + FileName + '.dat'); Rewrite(SaveFile); FOR I := 1 TO 200 DO Writeln(SaveFile, 'HELLO WORLD!'); Flush(SaveFile); Close(SaveFile); sdl_delay(500); Zip := TZipper.Create; Zip.FileName := 'saves/' + FileName + '.zip'; Zip.Entries.AddFileEntry('saves/' + FileName + '.dat', 'saves/' + FileName + '.dat'); Zip.ZipAllFiles; Zip.Free; Assign(SaveFile, 'saves/' + FileName + '.dat'); Erase(SaveFile); END.
Last edited by Christian Knudsen; 05-10-2012 at 07:18 PM. Reason: 'compress a file' not 'compile'
Laserbrain Studios - Currently developing Hidden Asset!
Ascii Sector - Real-time roguelike in space!
Haven't used TZipper, but can point some things:
- Linux has a case sensitive file system, double check what you save and what you load.
- Be aware that you may have a restricted permission mask over file attributes, you may be expecting -rw-rw-rw- and you are getting anything else.
- Your saving path can be different than your loading path.
So updating the compiler from 2.4.0 to 2.6.0 and also not compiling with any debug information seems to have fixed the issue. Weird.
Laserbrain Studios - Currently developing Hidden Asset!
Ascii Sector - Real-time roguelike in space!
Bookmarks