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 / Need help loading model and image files

Author
Message
Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 1st Jul 2007 04:03
I have all my files in the same folder as my .exe, and in it's media folder, I also tried including everything in the .exe, but whenever I run my program, I get this error:


After that happened, I tried taking out the LOAD IMAGE and TEXTURE OBJECT commands, then I got this error:


I also tried the commands with and without quoting the filenames.

Here are the commands that i am using, are they wrong or something?

Image:


Model (NOTE: ObjectID has already been declared as a variable):


Please help...



Click on the picture to order your copy today!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 1st Jul 2007 06:27
DBP is not finding your files. (It seems like it should, but I don't think it is). Within your program, you need to use 'SET DIR path$' (where 'path$' is the path to the folder holding your files). You could also do it longhand (i.e. load image "C:\Program Files\Dark Basic\myproj\sentrybot.bmp",1).

LB
Brain111
17
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 1st Jul 2007 06:49
You say you created a media folder? You may need to do it like this then:



You have to make sure that dark basic knows exactly where your file is. If you put it in a folder within your project folder, you need to include that in your file name. If you copied it directly into the folder with the exe, then your code is what you need.

Anarchy Burger - hold the Government!
FPSC Scripts
17
Years of Service
User Offline
Joined: 2nd Oct 2006
Location: Curacao
Posted: 1st Jul 2007 08:15
If you used a media folder and the models and images are in a folder called media,than you need to use

But if you have the model sentribox.x inside the exe folder (not inside any other folder in the exe folder,than you can use the code you used in your fist code)

i'm the M king.
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 1st Jul 2007 08:42
i'd go with Brain111's code

Silent Thunder
18
Years of Service
User Offline
Joined: 6th Feb 2006
Location: The Ship
Posted: 1st Jul 2007 09:06
If my project folder was C:/project, I tried putting the image and model files in C:/project, C:/project/media, and also including it in the .exe file and none of them worked.

I have no idea why, but it suddenly started working now, but I didn't change anything.........

Thanks for your help anyhow guys!!!......now I've got a ton of other problems to deal with......



Click on the picture to order your copy today!

Login to post a reply

Server time is: 2024-09-27 01:17:32
Your offset time is: 2024-09-27 01:17:32