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.

Newcomers DBPro Corner / [LOCKED] First exersize won't work

Author
Message
Jackdaw
16
Years of Service
User Offline
Joined: 3rd Mar 2008
Location:
Posted: 7th Mar 2010 10:46
I started with the first exersize in the book and, as far as I can see it should work. I have pasted the .x and the texture .dds into my project folder, but get runtime error 105 "File does not exist"
I cannot see what can be wrong.
Thanks

Jackdaw

load object "H-Alien Hivebrain-Attack1.x",1
loop object 1
sync on
sync rate 30
do
control camera using arrowkeys 0,1,1
sync
loop
rem runtime error 105 "File does not exist"
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Mar 2010 15:40
I would put the SYNC ON and SYNC RATE 30 at the first of the program, but I doubt if that is causing the problem. The "H-Alien Hivebrain-Attack1.x" file must be in the same folder with the .dba file. Oftentimes, objects and textures get placed in a 'media' or 'objects' folder. You can do that, but DBP won't find it unless you add the folder name (i.e. load object "objects\H-Alien Hivebrain-Attack1.x",1)

If this isn't the case, and you have it with the .dba file, double-check the filename spelling. It must be 100% correct.

Lastly, if you still cannot get it going, try loading in the .dba file and then running it. I know it sounds silly, but if you typed it in from a manual and saved it and then tried to run it, DBP will not find the files. You have to load in the .dba file in this case for it to work.

Hope this helps.

Jackdaw
16
Years of Service
User Offline
Joined: 3rd Mar 2008
Location:
Posted: 8th Mar 2010 07:56
Yup, that was the problem. Once re-loaded it worked fine.
Thanks.
I just guess I will have to get used to it's own way of doing things
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 13th Mar 2010 14:04
Quote: "The "H-Alien Hivebrain-Attack1.x" file must be in the same folder with the .dba file."


No, it must be in the same folder as the .dbpro file.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Mar 2010 15:36
Quote: "No, it must be in the same folder as the .dbpro file."


You are not correct. If you only have a .dbpro file in a folder with your media when you load it in, the editor will be blank. It needs the .dba file to provide the actual code text. Whereas, if you only have a .dba file, the code text will indeed load.

In essence, if a .dbpro file has been created, it will be accompanied by a .dba file. If you do not have your media in the same folder as the .dba file, you will have to provide the additional path needed for DBP to find it.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Mar 2010 20:43
That's not what I'm talking about, but if you are infact right, then I apologise.

I'm fairly certain that darkbasic uses the .dbpro file as its root, not the dba.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Mar 2010 20:55
Why don't you try it for yourself? Take a game of yours that has both a .dba and a .dbpro file and remove the .dba to somewhere else, load in the .dbpro file and see what results you get. Then try it again, removing the .dbpro file, loading in the .dba and see what happens.

Not trying to make anyone look bad here, just trying to set the record straight.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Mar 2010 21:06
Ok, made a simply program.



Moved the file load.dba to the source folder. Opened the .dbpro, obviously I had to add in the load.dba file for it to work.

The object loaded fine.

Moved the load.dba back to the project root folder. Deleted the .dbpro and ran the .dba

Runtime error, file does not exist at line 1...

If you don't believe me, try it for yourself

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Mar 2010 21:36
You have the following in the same folder:
.dba file
.dbpro file
room.x file

You run DBPro, load in the .dbpro file and everything shows up and works fine.

You close DBPro, move the .dba folder to the desktop (a place other than where the main folder is), open DB Pro again and load in the .dbpro file and it comes up blank.

If you close DBPro again, move the .dba file to your main folder and move the .dbpro file to the desktop or whatever, and run the program, it will load. At that point, you must answer yes to allow DBPro to create a new .dbpro file in order to see it.
I don't know how to explain it any better than this.

We are really splitting hairs over a non-issue. I really wish you would not have brought it up in the first place.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Mar 2010 21:53
Which is what I've just said.

The only reason I made an issue of it, is because a file cannot be loaded, and the statement he made is incorrect.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Mar 2010 22:22
Sighs deeply......

Referencing this:
Quote: "Quote: "The "H-Alien Hivebrain-Attack1.x" file must be in the same folder with the .dba file.""


which is a correct statement, you said:
Quote: "No, it must be in the same folder as the .dbpro file."


when the reality is that the media indeed must be in the same folder with the .dba. While the .dbpro file will be there too, you are wrong to say that the media needs to be with the .dbpro file instead of the .dba file.

This is my last statement on the issue. You've hijacked this guy's thread to argue your point and you are wrong. If you can't figure it out, I couldn't care less. I'm not going to argue with you anymore.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 15th Mar 2010 00:02
Alright, I was wrong. I apologise LBFN for arguing with you and sorry for jihacking the thread with a stupid argument. I hope you fix your problem.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 15th Mar 2010 01:07
LBFN, DBPro DOES use the .dbpro file as the root directory. The .dba file is NOT necessarily in the same directory as the .dbpro file. Examples you have posted have demonstrated what happens when an editor can't find the .dba file (because your .dbpro file points to the wrong path). Try this:

Create a new project, with this code in the main source file:



create a new folder called "source1" and add "source1.dba" in that folder (NOT the one created with the project), then put this code into source1.dba:



when you run the code, it creates a white cube and two BLUE cubes, not a blue one and a green one (and a white one). This demonstrates that the project directory is in fact the base directory. there may be a possibility this is not the case with subroutines, but I dun wanna test it.

In other words, YOU'RE WRONG LBFN, SUCK IT!

also, I think the problem was that the file loaded in the IDE wasn't in a project, so it was using the temp directory as it's base directory, instead of the user-intended project directory.


LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Mar 2010 04:54
Quote: "In other words, YOU'RE WRONG LBFN, SUCK IT!"

It's posts like that that give this forum a bad name. If you disagree with me, fine, we can debate, but please don't say stuff like that, as it really is unnecessary.

My original point was that in order to find an .x file, it needed to be in the same folder with the associated .dba file or you would have to add the folder name to the load. You #include some .dba code, but the main folder where the original .dba is located is where the object needs to be unless you provide the path to the object.

Your post does little to show me otherwise. All it does is load in the same object twice. The object is in the folder with the .dba.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Mar 2010 05:20
Quote: "Yup, that was the problem. Once re-loaded it worked fine.
Thanks."


OK, his problem is solved so the argument over what is or isn't where it should or shouldn't be is now irrelevant - particularly when it's rare for anyone to have a project's .DBA and .DBPro files not in the same location - assuming a project file has been saved, (which may not have been the case here).

Neuro Fuzzy:

Your comment was uncalled for and following the AUP guidelines, would have got you a slap - were it not for the fact that it was ambiguous. Where I come from, if you are proven wrong, you have to 'suck it up' and get on with it.

I will assume that this was the context in which you used the phrase, but please choose your words more carefully next time.

Thread locked.

TDK

Login to post a reply

Server time is: 2024-09-28 16:29:13
Your offset time is: 2024-09-28 16:29:13