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 / Folders And Textures???

Author
Message
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 8th Jul 2009 10:04
Ok im having a bit of a dilemma here.

I have set up the textures to be loaded from a folder \Textures\Stars\FILENAME

and it keeps on coming up with an error about loading the image in..

One solution was to put it in the same folder as the exe, and it worked, but i would like to be able to organize all my media and stuff into seperate folders..

I also tried in the properties panel changing the final exe's end result....
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 8th Jul 2009 11:46
So, how do you access that folder then?
programPath + "\Textures\Stars\" + filename + "." + extension
should work.

lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 8th Jul 2009 11:51
well i tried doing the same thing you did without the variables..

ill give it another go after tea....
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 8th Jul 2009 12:34
ok i tried putting in the full path starting at C:..


the only problem with that is when i move it i have to change the path in the code...

is there a command to determine its position.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 8th Jul 2009 12:41
Sorry, but I don't quite get it.
Exactly what is the problem?

Remember that the default IDE (maybe others too) sometimes sets the main path of the executable to the temp folder, even though it is actually residing in a different folder.
Use "print get dir$()" or similar somewhere for verification of that.

(To get the real executable folder, you extract it from the appname$() string).

bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 8th Jul 2009 12:42
Can you post the code you are trying to execute? here is how i always do it

load image "Media\Images\BulletHole.png", 1

and i never have problems with that. and with that code, my exe is in the same folder as the map media.

Your signature was erased by a mod because you copied mine!
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 8th Jul 2009 13:21
well it works when the media is in the same folder

i use



to load the image in..


OK so it is using the temp folder....

is there any way to change that so that i can compile the project anywhere and it will work fine..
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 8th Jul 2009 14:22
under the project manager, in Project Summary, 'EXE Filename' perhaps?

when I opened a blank document, "%temp\dbp_program.exe" was the default filename. I don't know for sure, but I would suggest taking out the "%temp\" part.
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 8th Jul 2009 14:55
ok that was weird...

i opened it up in synergy and tryed changing a few things, then i opened it in thr DBP IDE and compiled it then it worked...

That was a big fat bug..

thankyou for the help anyway...
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 8th Jul 2009 18:38
Yes, it does that at times as said.
Usually you just save the project, close and reopen the editor and it works. If it doesn't, you change the path in the project view, compile once (you may then remove the created file) and change it back again.

To be sure, I always have a main path variable and use that however.

Login to post a reply

Server time is: 2024-11-24 03:22:50
Your offset time is: 2024-11-24 03:22:50