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 / Problems Dealing with External Files?

Author
Message
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 13th Aug 2003 21:28
Ever since I've had DBPro, I've noticed a couple of odd errors with it. When I starting working on an FPS, it really starting bugging me. It seems as though DBPro has problems finding my external files.

For example, I was trying to #include LoadMatrixPro.dba in my game (in the same directory as the source dba I was working on), but the editor told me it didn't exist. I commented it out and did a test compile. None of the files I tried to load at startup could be found.

This is very odd, because the files are quite obviously in the very same folder as the source, the DBPro project file, and everything else. This has been an off-and-on problem for a long time, and I think I'm going to go Berserk if the stupid program tells me that file doesn't exist one more time when I'm staring at the filename in Windows Explorer...

Has anyone else had a similar problem or does anyone know of a solution? It's halting progress rather annoyingly.
My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Aug 2003 21:45
Don't use #include

Use the editor to include your external files.
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 13th Aug 2003 22:21 Edited at: 13th Aug 2003 22:21
It wasn't a necessary file anyway, just something I had left in there. However, it also does this with music, sounds, images, objects, everything. Not just #included files.

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Aug 2003 23:20
Have you tried removing the project file and creating a new one?
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 13th Aug 2003 23:31 Edited at: 13th Aug 2003 23:33
Hmm, well, I tried including everything in the exe through the editor and I'm still getting errors such as

"Runtime Error 3502 - Could not load music at line 51"

Correction- Hmmm...I think I know why DBPro can't find it. It deleted it! As a matter of fact, all of the MP3 songs I had in the project folder are gone now! When this error first came up they were there!

This HAS happened before, and with the same project as well. I have tested this now with both P4.1 and U5 beta 3. This is absolutely absurd! I would really like someone to explain why my files are being eaten up by DBPro (and why it's only ever been my MP3 files; no other file type has been deleted before).

Note - Even though it eats the music files, if I comment them and the places they were used out, the other files still cannot be found by DBPro.

Edit - Posted before I did, Ian...I'll try that again, although I have tried it in the past with no success.

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 13th Aug 2003 23:40
Hmmm...after deleting the project file, I tried simply running it with no project file. It still wouldn't run, telling me "pistol.dds" was missing. I verified its existence afterwards, so at least DBPro didn't eat my pistol texture. I created a new project file and it ran without warning or error (although it still bombed to the desktop after it got to a certain point, but that's probably my fault).

Hmm...very weird.

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 13th Aug 2003 23:45
Nevermind, it still won't work. Well, it worked for one compile, now it does the same thing again (except for machinegun.wav now, because it ate my friggin' MP3s).

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Aug 2003 01:51
No-one else is having these problems ... the forums would be full of posts like this if they did.

What version of the editor are you using? Have you upgraded it?

Beyond that, the only thing that may help is if you give a blow-by-blow description of what you are doing.
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 14th Aug 2003 16:25
I upgraded the editor, but it still doesn't help.

Currently, it tells me that machinegun.wav doesn't exist. I'm pretty sure that the only reason it uses machinegun.wav and not some other file is because that is the first sound I attempt to load in the program.

So for some reason it won't find my machinegun.wav file, or any other file...

I have taken screenshots of the error in action.

They can be found here:
http://unseenstudios.netfirms.com/screenshots.html

It shows exactly how the file does exist, in the project folder, yet DBPro just will not find it.

Hope that helps trying to solve this problem...

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 14th Aug 2003 17:46
Does it still give the error if you comment out the line?
After you delete the line all together.

I have had problems before where there have been errors for no reason and deleting the line from the ide still produced the error with the ide pointing to a blank line. Even if you commented all the lines before and including the one producing the error.

Try deleting the dbpro file and loading the dba file.
If that doesn't work copy and paste the text from the dba file into a new dba file with a new name. Then delete the original files and load the new dba file.

Copying and pasting the code into a new project has always worked for me.
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 14th Aug 2003 18:15
...Hmm, well, after doing the latter option of copying the entire source code and putting it into a file with a different name and deleting the old stuff, it seems to work (well, it still bombs to the desktop, but that's farther than it got before). However, I've been at this stage before (see reply number 5), and immediately after it started doing the same thing again.

Oh well, I'll see if I can find out why it bombs before it starts up again. Thanks for the help.

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 14th Aug 2003 18:29 Edited at: 14th Aug 2003 18:32
Well...its still doing it. Now, though, I think I'm starting to catch onto the problem. It seems like every time I modify the project settings from the defaults this begins to happen. So, technically, if I leave the project settings alone it should work fine. I've yet to test that theory, but I will...

My friends' and my website for DBPro Programming:
http://unseenstudios.netfirms.com
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Aug 2003 23:32
DBPro can be a bit hit and miss when reporting errors. An error message you are getting may be absolutely nothing to with what is actually causing the error.

I notice that in your screenshot, you have a LoadMatrixPro.bak file which suggests that you have modified LoadMatrixPro.dba at some point. This include file should never be altered at any time and if it doesn't work, you don't have the correct version.

The reason for mentioning this is that I've found that errors in external include files can create unusual error messages in DBP.

TDK
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Aug 2003 01:28
That's because when you click the 'save all' button, it will save the included files even if they've not been modified.

I usually click it too, just to ensure that the project file is saved when I modify settings - it's easier than navigating the menu ... for me at least
MasterInsan0
23
Years of Service
User Offline
Joined: 14th May 2003
Location: United States
Posted: 20th Aug 2003 02:16
Hmmm...well, I haven't had the problem as long as I don't mess with the project settings. I figure it was simply one of the preferences I was setting that was causing the error. Still, I do find it odd that DBPro would have such a glaring bug for me and no one else have it...

Also, TDK, IanM is correct; I used to click the save all button to ensure project setting changes. Actually, I would click both save and save all several times .

In that screenshot, it is before I cleaned up my project folder. I had not removed the LoadMatrixPro file even though I was no longer including it in the project and no longer using Matrices for levels (taking another crack at BSPs...).

Maybe with further examination I can find which settings cause the problem and which don't.

My friends' and my website for programming:
http://unseenstudios.dbpcommunity.com

Login to post a reply

Server time is: 2026-07-25 09:38:48
Your offset time is: 2026-07-25 09:38:48