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 Discussion / Why is this happenin?

Author
Message
Deathead
19
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 7th Mar 2007 23:23
Pls tell me why a code bit is goin wrong when i put

And then i put a sound in. It goes...
Error Bitmap does not exist.

Deathead
19
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 7th Mar 2007 23:23
Forget the / okay

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Mar 2007 01:30
Hello Dh,

You have to make sure of a couple of things:

1. Does the file exist? Did you type the name correctly?
2. The file must be in the work directory. That is the directory where you have saved your DarkBASIC program.
3. If the file is not in the work directory, you must include the full path when referencing it. For example, if the file was in the folder c:\media\plants, then you would type:

LOAD IMAGE "c:\media\plants\Grass.bmp",1

Enjoy your day.
Deathead
19
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 8th Mar 2007 14:26
I get it right all the time it's just when i load a sound it works but when i put a bitmap in it goes Can't load bitmap on the sound!!!

Quisco DaLuse
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: USA
Posted: 8th Mar 2007 14:52
Deathead - can you show all of the code, including loading the sound?

You idiots! You've captured their stunt doubles!
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 8th Mar 2007 15:04
Try and save the bitmap using a different bitdepth, DBC can sometimes be very picky about it's images

Sonic 91 Software
21
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 8th Mar 2007 18:06
try using "load bitmap", rather than "load image". then use the "get image" command to get an image from it.

"Fight the good fight of faith,
Lay hold on eternal life"
-1 Timothy 6:12
Deathead
19
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 8th Mar 2007 22:26
Sonic it kums with error unknown command!


Then the error finder says Line 4 Bitmap does not exist

Sonic 91 Software
21
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 8th Mar 2007 23:22 Edited at: 8th Mar 2007 23:23
have u tried "load bitmap"? in the meantime, u must make sure the files are in the same directory as your code, i.e. if your code is in a directory called "my game" or whatever, all the media has to be in that same directory for it to be loaded. otherwise, if you are doing everything correctly, then it may be a system error, and not to do with darkbasic. what you could do is, run the same program again and when it comes up with the error, press the "print scrn" button on the keyboard, paste the image into ms paint and save and attach it to a new message in this thread, so we can see the error it's coming up with. if you could also do the same with the folder you have all the code/media in as well, that would be a great help too, and i should be able to solve the problem for you.

"Fight the good fight of faith,
Lay hold on eternal life"
-1 Timothy 6:12
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 10th Mar 2007 20:39
the error isn't really on line 4. DarkBASIC has a tendency to "skid" when it has an error. the real error is a few lines above the error, in your case, the image you are trying to load doesn't exist. Like they have said, make sure it is in the same folder as the code. You can also try out a different image, to see if it is just a problem with the image itself. As ridiculous as this could sound, make sure you got the name completely right, copy and paste the name of the file including the extension into dbc. that way you know that it isn't just a typo

hope this helps
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Mar 2007 18:33
If the image you are loading is correct, don't use Load Bitmap, stick with Load Image - otherwise you have to grab the image, then switch and delete the bitmap.

As has already been stated, the problem is that DB can't find your bmp file. Your best bet is to copy the file Grass.bmp into the same folder as the DBA file and use:

Load Image "Grass.bmp",1

TDK_Man

Deathead
19
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 11th Mar 2007 20:19
Thanks i'll give it a try!

Sonic 91 Software
21
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 12th Mar 2007 11:19
Quote: "Your best bet is to copy the file Grass.bmp into the same folder as the DBA file"


funny that this has already been suggested several times, including by me, and it's only now that deathead seems to listen.

Quote: "The file must be in the work directory. That is the directory where you have saved your DarkBASIC program.
"
(latch)

Quote: "u must make sure the files are in the same directory as your code, i.e. if your code is in a directory called "my game" or whatever, all the media has to be in that same directory for it to be loaded. "
(sonic 91)

"Fight the good fight of faith,
Lay hold on eternal life"
-1 Timothy 6:12
Deathead
19
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 16th Mar 2007 22:48
Sorry i could not try moniters messed up.

And i did listen i just could'nt understand urs Sonic 91.

Sorry.

Login to post a reply

Server time is: 2026-07-06 06:42:55
Your offset time is: 2026-07-06 06:42:55