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 / Loading anything problem

Author
Message
Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 10th Dec 2005 23:57
Howdy, I have got a problem wih my version of DarkBasic Pro.
When I try to load anything, anything at all, Instead of loading stuff from the folder that it is in, like:



I must instead do this:



And I must say that it is extremely annoying. I may not be in the correct forum, but is this a bug (I doubt) and a way to fix, or, I think, a new feature. Is there anyway to get back to the old way of loading?

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Dec 2005 02:25
The first method works for me perfectly, so it would help to know what (if any) error you get when it doesn't work.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 11th Dec 2005 14:12 Edited at: 11th Dec 2005 14:20
your second snippet is a very inefficient way of loading things... If when installed on my machine I didn't install this to


(in snippets since it keeps taking the slashes off )
(and off the record, I never store anything there) it will crash since this is where it has been told to look...

perhaps before your first snippet's open quote, you could put in get dir$() so it would look like



Edit: forgive me for missing off the slash in that snippet

alternatively, you're using load image for a bitmap, perhaps you could try using load bitmap instead...

and lastly, you haven't changed the directory earlier in your program, have you? if you have, store your current directory before changing, this way you can get back to it without absolute referencing...



...maybe one day I'll finish a project
Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 11th Dec 2005 20:26 Edited at: 11th Dec 2005 21:08
Nope, still not working . Maybe I should reinstall DarkBasic?

Edit: Okay, I reinstalled DarkBASIC, and I tried, it didnt work. I updated it, it still didnt work.

Okay, the error Im getting is as follows:

Quote: "Runtime Error 1003 - Could not load bitmap at line 6"


I realise that the words "Bitmap" and "Line" are relative, but I included them for the hell of it.

Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 11th Dec 2005 21:25
I am an Idiot, if not a dashingly handsome and incredibly intelligent one.
I found out that I was saving my programs as .dba's. I didnt realise that .dba's cannot load anything. I saved them as .dbpro's and viola! It worked!

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Dec 2005 22:36
Both are needed for more stability. .dbpro files hold the project settings, where to find media that's included in the project, and any notes you've written in the project. .dba files are the actual code itself. When you want to save your code always use "Save All"... that saves both files.


Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 12th Dec 2005 06:06
so, how do I use them both together? Im confused. Are you saying that I only do the load whatever commands in the .dbpro, and everything else in the .dba?

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 12th Dec 2005 06:48
There are three ways to save.

"Save Project" - Saves .dbpro files.

This is what a .dbpro file looks like:


"Save Source" - Saves a .dba file.

Here's the source for the project data above:


If you just use "Save Project" your source isn't saved. If you use "Save Source" any changes you made to the settings like added media, to-do list items and so on are lost.

If you use "Save All" it allows you to save both files. First it'll ask for the .dbpro filename you want... then the filename of the .dba. Using "Save All" makes sure that nothing is lost.


Fneep
19
Years of Service
User Offline
Joined: 3rd Sep 2005
Location: In my house
Posted: 12th Dec 2005 09:22 Edited at: 12th Dec 2005 09:25
Look, Im not that much of a newb. I know what I dbpro file looks like. I also know how to save them. For a moment, I just thought it was a whole lot more complicated then it actually was.

Oh, and as a sidenote, are you using DBPRO or DB Classic? To make a rem in DBPRO, I use ` not ;. ; doesnt work in DBPRO

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 12th Dec 2005 10:23
Sorry but when you said:
Quote: "I found out that I was saving my programs as .dba's. I didnt realise that .dba's cannot load anything. I saved them as .dbpro's and viola! It worked!"


It looked to me like you were doing the common mistake new people do and saved only the project or only the source rather than both.

Quote: "Oh, and as a sidenote, are you using DBPRO or DB Classic? To make a rem in DBPRO, I use ` not ;. ; doesnt work in DBPRO"


I use both. I use Pro for my own projects and to help people that use Pro. I use Classic to help people that only have Classic.

As I said before... a .dbpro file is for the project settings... not code. It does not use the rem statements that are used in Darkbasic.


Login to post a reply

Server time is: 2024-11-27 10:49:18
Your offset time is: 2024-11-27 10:49:18