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.

DarkBASIC Professional Discussion / Error code 13 when using file blocks in enhancements pack

Author
Message
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 30th Aug 2006 15:40
When running the following code I get an error code 13 message box from the enhancements pack.



Its this line open file block "sys.rpf", 1, g_sKEY where I get the error, any ideas what error code 13 means??

Thanks in advance.

I know the voices aren't real, but they have good ideas!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Aug 2006 16:58
It means that your file doesn't end in ".zip". It's a real pain in the derriere and was introduced at U6.1 IIRC. I've asked for it to be changed back to the default behaviour, but as yet it hasn't been done. I think it looks very unprofessional to package ".zip" files with your game.



monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 30th Aug 2006 17:18
Ahhhh, I wonder why they did this in the first place??

I'm with you on the putting zip files in with your game, but thanks for that BatVink, renaming my files to .zip sorted it out.

I know the voices aren't real, but they have good ideas!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Aug 2006 18:18
It was done because somebody wanted to ensure users couldn't select and try to open a non-zip file. This crashed the program. However, my angle on that is that it's easy to to a check in your program, there's no need to force everyone to recode their games!!!



monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 30th Aug 2006 18:24 Edited at: 30th Aug 2006 18:25
Absolutely, so now instead of crashing when the user tries to open a non-zip file, the program chucks an obscure error then closes when a zip file that doesn't have the correct extension is opened.

Surely it would have been just as easy to check the zip header in the open function, and return a value stating whether or not the file is indeed a zip?

I know the voices aren't real, but they have good ideas!
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 30th Aug 2006 18:39
That is a pretty rotten change. I don't want ".zip" files in my games. That just seems really unprofessional, and unnecessary.


Come see the WIP!
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 30th Aug 2006 18:45 Edited at: 30th Aug 2006 18:45
It is, I have just tried a work-around by renaming my pak file before I try to open it with the file block function, extract the files, then rename it back to .rpf but it didn't work. I assume the reason it didn't work is because the file renaming function puts a request into the windows queue to be processed and so the open file block command is executed before the file is renamed.

I know the voices aren't real, but they have good ideas!
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 30th Aug 2006 18:47
I've considered doing the same thing, thanks for the heads up. You should probably pause it from doing anything until the .rpf file exists.


Come see the WIP!
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 30th Aug 2006 18:52 Edited at: 30th Aug 2006 18:54
Yeah pausing after the rename call should solve this.

EDIT: Just read your post properly

I know the voices aren't real, but they have good ideas!
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 30th Aug 2006 18:52
It seems to work OK here, I have the latest version installed
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 30th Aug 2006 21:38 Edited at: 30th Aug 2006 22:15
Ok, I have altered this code to loop until the zip file exists, but I still get the same thing.

The codez:



@Chenak

Are your files .zip files ?????

I know the voices aren't real, but they have good ideas!
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 31st Aug 2006 03:30
Nope, i called it dbw, it seems to be fine. I've been using it for a long time without any problems. I've uploaded the dll, of course you need to have bought it to use to beable to use it Backup your dll before replacing it though

Attachments

Login to view attachments
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 31st Aug 2006 03:35
Strange, I'm using the v4 dll that is in my order history which is the latest release.

Also I'm using dbp 6.2b is that what you are using?

I know the voices aren't real, but they have good ideas!
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 31st Aug 2006 03:40
I'm using 6.2b, I got no idea what version enhancement pack im using, all I care about is that it works. It should be version 4 aswell
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 31st Aug 2006 05:23
ive renamed my files to zip and it still crashes..

im going to try a few things...

wait, does anyone know if the old enhancements pack works with 6.2?
because fileblocks are the ONLY reason i bought enhencements...


http://www.seqoiagames.com/seqoiacorp/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 31st Aug 2006 07:59
wow, the enhancements pack sucks (sorry to say).
just use memblocks and implement your own file reading system.

you dont even need to do that, just use the standard files.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Aug 2006 09:57
Quote: "wait, does anyone know if the old enhancements pack works with 6.2?
because fileblocks are the ONLY reason i bought enhencements..."


The enhancements pack was updated with U6.2. It was mainly for issues with missing commands, rather than updated functionality (Ogg Vorbis and Speech commands had gone AWOL).



monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 31st Aug 2006 11:21
BULLSHOCK

Have you tried the example projects that come with the enhancements pack? if they work then it must be something to do with the code.

I fell for a gotcha while doing this myself, I renamed all the files to zip just to test this theory then altered all the file names in the open file block commands but I missed one so I was still getting the error.

I know the voices aren't real, but they have good ideas!
Chenak
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 31st Aug 2006 15:56
Did anyone try the dll I attached? Did it work?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 31st Aug 2006 16:52
Chenak

I haven't, I have the latest installed already, which is the version that introduced this problem I think, but fixed some others, I have a work around for it now.

I know the voices aren't real, but they have good ideas!

Login to post a reply

Server time is: 2024-04-23 22:57:17
Your offset time is: 2024-04-23 22:57:17