Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Create zip. Anyone tried?

Author
Message
Stormwire
13
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 1st May 2012 23:31
Im trying the example out with the new 107 release but it keeps telling me "Cant open zip at line 17". Ive tryed the command on its own and still the same response. Im on win xp 32 bit. Anyone else having this problem?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st May 2012 23:40
Code?

kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 1st May 2012 23:48
Quote: "Cant open zip at line 17"


Looks like you use ExtractZip( zipfilename, path ) somewhere?

Code would be more than useful.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 2nd May 2012 02:06
Just tried it. This worked for me. I created a test file called test.zip and extracted it in agk to a new folder called extracted. The zip file was in the media directory in my main project file and the extracted directory was created within that. Of course you can change that now, if you want.



Stormwire
13
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 2nd May 2012 02:42 Edited at: 2nd May 2012 02:43
The original test was with the example that comes with AGK. Its in the Examples/File/ZipFile folder. That example doesnt work for me. Just keeps telling me what I said earlier.

I tried the following.


and



Neither work. Both give the same error "Failed to open Zip file". The same error the example project gives.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd May 2012 03:42
Try using SetCurrentDir("") near the beginning of your code. I think there may still be some issues with the old media folder path being default.
Stormwire
13
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 2nd May 2012 04:25
Thanks Paul that works now.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd May 2012 10:48
Quote: "Try using SetCurrentDir("") near the beginning of your code. I think there may still be some issues with the old media folder path being default."

I meant to mention that. One of the examples I posted wouldn't save an image in the "MyDocuments" folder until I added that line.

Login to post a reply

Server time is: 2024-05-02 13:28:38
Your offset time is: 2024-05-02 13:28:38