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 / I don't understand this error

Author
Message
Lan
16
Years of Service
User Offline
Joined: 8th Sep 2009
Location: Earth
Posted: 29th Apr 2010 04:54
"Could not locate source file C:\Program Files\The Game Creators\Dark Basic Professional\Help\gfx\\dbph_head_1.jpg.dba"

I don't understand why I am getting this.

[Insert Signature Here]

http://www.LanKingProductions.com/
Dragon Knight
19
Years of Service
User Offline
Joined: 10th Jan 2007
Location: Newcastle
Posted: 29th Apr 2010 05:27 Edited at: 29th Apr 2010 05:28
look at the file name ".jpg.dba" <-- this part especially

can you have an image file that's also a .dba source file? no

point being what are you trying to load? an image or a source file, and go into that directory and find out what file you're actually trying to load weather it's a .jpg or a .dba file.

.jpg = an image file type
.dba = dark basic source file

The actual error message states it cannot locate that file in the directory given. Meaning the file you are trying to load does not exist

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 29th Apr 2010 07:12
Could not locate source file C:\Program Files\The Game Creators\Dark Basic Professional\Help\gfx\\dbph_head_1.jpg.dba

invalid (or at least really weird) file extension, and two slash marks where there should be one.


tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 29th Apr 2010 07:36
Did you add a JPG image file to your list of source files in the editor? Perhaps it tacks on a .dba in that case?

I would suggest starting with a new DBPRO project file and adding your files back one by one.


A 3D marble platformer using Newton physics.
Lan
16
Years of Service
User Offline
Joined: 8th Sep 2009
Location: Earth
Posted: 29th Apr 2010 13:24
Im doing things with text. I'm not loading any files. That's why I thought this was so weird.

[Insert Signature Here]

http://www.LanKingProductions.com/
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Apr 2010 14:20
Post your project's dbpro file - there might be a clue in there.
Lan
16
Years of Service
User Offline
Joined: 8th Sep 2009
Location: Earth
Posted: 29th Apr 2010 21:55
I'm trying to see how to do a cheat by typing in the word.



[Insert Signature Here]

http://www.LanKingProductions.com/
Non Sequitur M
17
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 30th Apr 2010 01:53 Edited at: 30th Apr 2010 01:55
You can't have this line:


You need:


Also, if you are needing to use the else command, you need to use endif at the end of an if statement. DB won't recognize else outside of an if statement, IIRC.

So, it would look like this:


And, if you define a variable with a #, then all iterations of that same variable need the #. Plus, you didn't even define the variable with anything.

I'm surprised you aren't getting tons of errors with this... Are you even looping for user input?

Learn how to implement all the commands first before you come here and ask for help. Not trying to be mean, BTW. Just stating the facts.

If life were like a box of chocolates, I'd know what I would get... The one that got dropped on the floor and put back in the box.

Iye nehvur yoose spehl chehk, ahn mie tippyng izz fiyne.
Lan
16
Years of Service
User Offline
Joined: 8th Sep 2009
Location: Earth
Posted: 30th Apr 2010 03:16
Yeah, I used to be really good with this a few months ago, then I took a C++ class, and that's all I've been doing. I was just doing this as a refresher. Thanks for the help by the way! Very useful.

[Insert Signature Here]

http://www.LanKingProductions.com/
Non Sequitur M
17
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 30th Apr 2010 04:26
Oh, sorry... I thought you were new to DB. Gotta shake off the cobwebs, huh?

Anyway, cheat functions are always cool. One of the easier ways to implement this is to check for a particular set of buttons being pressed at one time.

If life were like a box of chocolates, I'd know what I would get... The one that got dropped on the floor and put back in the box.

Iye nehvur yoose spehl chehk, ahn mie tippyng izz fiyne.
Lan
16
Years of Service
User Offline
Joined: 8th Sep 2009
Location: Earth
Posted: 30th Apr 2010 21:28
How do you check for a set of buttons? I've only ever used individual keys.

[Insert Signature Here]

http://www.LanKingProductions.com/
Non Sequitur M
17
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 30th Apr 2010 22:23 Edited at: 30th Apr 2010 22:30
You could do something similar to the following:

This statement checks to see if the user is pressing ctrl+alt+z. Using the and/or operators can group conditions and even make multiple conditions do the exact same thing.

These three following code segments are functionally identical:



All three check for ctrl+alt+z or ctrl+alt+x, and print "Cheat" if either combos are pressed.

Now, if you want them to be able to type it in, then this is an okay option here:


There are vastly more efficient ways of doing this, but this is the most basic way(No pun intended), and is the easiest to understand.

Although, I don't personally like scancode, because if more than one key is pressed, scancode inherently returns the lower of two values(pretty weird).

If life were like a box of chocolates, I'd know what I would get... The one that got dropped on the floor and put back in the box.

Iye nehvur yoose spehl chehk, ahn mie tippyng izz fiyne.
Lan
16
Years of Service
User Offline
Joined: 8th Sep 2009
Location: Earth
Posted: 1st May 2010 22:26 Edited at: 1st May 2010 22:26
Oh, I thought it was a special command, not a combination of if's. Haha. Thanks anyway!

[Insert Signature Here]

http://www.LanKingProductions.com/
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 1st May 2010 22:28
What happened to your original problem with the jpg.dba ?


A 3D marble platformer using Newton physics.

Login to post a reply

Server time is: 2026-07-26 04:26:52
Your offset time is: 2026-07-26 04:26:52