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 / Adding media files to a project !?.....

Author
Message
DigitalDreams
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 21st Aug 2011 11:44
Hi Team

Trying to edit/improve an old dba project. I have the .dba file and all media in one folder. I can open the .dba in the editor (showing under 'project' in the solution explorer) with no problems....

If I try to compile/run a list of errors occurs as below and the file does not run properly...

"Media file C:\Users\Administrator\AppData\Local\Temp\media\brick13.jpg will not be added to the final exe; it needs to be under the project path"

The path above is not the project folder (just a temp compling location I guess) & all media files are in the same folder as the .dba !?. So where does it expect the media to be ???. I noticed a 'media' toolbar and added ALL media files into that....still no go, same error <sigh>.

Thanks in advance !
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Aug 2011 12:40
I think you have set it to compile the media into the executable. Change the Application type and it will help you compile and check your errors.

DigitalDreams
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 21st Aug 2011 15:22
Naaa....

The application type is 'media'. Changing to 'exe' doesn't help of course.

If I start from scratch and load say the 'facedemo.dba' the same problems exist even though all files seem fine and are where you'd expect them to be (in the relevant source .dba directory)....

"runtime error 105- file does not exist at line 9"
(9 load object "media\Head.x",1)

If I select 'tools, associate project and source files', it's still a no go....

DBpro reports 'Version 1.0761'. I'm running Vista64 and the desktop icon is set to 'run as administrator'

Programs that don't load media files seem to run fine....

<sigh>
Drillfoot
14
Years of Service
User Offline
Joined: 7th Aug 2010
Location: United States
Posted: 26th Aug 2011 01:26 Edited at: 26th Aug 2011 01:28
Do you have to possibly add media one by one through the interface? Such as the add media tab/add file ? Instead of just loading the .dba files, I would load those up, ten at the same time add each individual file you would like to include in the media. I noticed you tried this already. But have all your .dba files, as well as media files in one folder, not all over the place. Then save the project, and source to that same folder.

rem allow user create game with one click
rem create graphics, sound, scripts, models, with one click
rem slap user in face if game choice is mmo
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 28th Aug 2011 01:20
When I am creating my game , I have put my media files in a fileblock and you need to have Enhancements Expansion Pack.

And I have all of my .wav files in the exe. And my application type is media.

Try to not have separate folder as media in your project.
I use to have all my media files in the same folder as my project files. And I add the media files , one by one. Then I compile my game and I don't have any problem loading my media files.

I use to use media files and Fileblocks.

Fileblocks from Enhancements expansion pack are great , I zip all in one big zip file , I put and password , I load them with the expansion pack. Only wav files and fonts are compiled in my exe because exansion pack supports only .ogg files as sound.
Any strange file I want to load which is not supported with fileblock , I put it in the same folder (root) of my game , I select the files and add them one by one and compile the media and everything is great.

If I want my application be more professional , I rename and my huge zip file to any extension I want and all my datafiles are related with the game.
For example if I have one huge zip file for my Eye of the Beholder game as interface.zip , I rename it as interface.eob you can rename everything you want as .dat if you have your data files , or if you have your levels as .lev and any kind of extension and your game is professional

I never had problems with media files and fileblocks. But I never put them in other folder as media.

Try to do my technique. For me works perfect.
DigitalDreams
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 30th Aug 2011 13:17
Ok.....

Even if all files are in the same directory with no subdirectories they won't load....

Can someone cobble together a VERY short 'noddy' to say open a window with a 640*480 .jpg loaded as the background ?. I'll try to get that working !

Regards
DigitalDreams
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 1st Sep 2011 23:44 Edited at: 1st Sep 2011 23:45
Is this a clue to what is happening ?

When I 'save,compile & run' a simple test program with NO media files, the resultant 'Application.exe' is NOT saved to my project folder but to 'C:\users\administrator\appdata\local\temp\Application.exe' !?!

Surely if you load a .dba, compile & run, the .exe should be saved in the same directory as your .dba file ??

Regards
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Sep 2011 14:24
You're loading a dba. You need to create a .dbpro file, which is a project file. It then uses this as a root of your program. From there, you add your source files.

DigitalDreams
13
Years of Service
User Offline
Joined: 3rd Aug 2011
Location:
Posted: 2nd Sep 2011 16:29
Thanks Indicium, solved my problem.....

Login to post a reply

Server time is: 2024-11-22 16:42:50
Your offset time is: 2024-11-22 16:42:50