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 / Suddenly wont load an image file - why?

Author
Message
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 9th Apr 2009 08:29
Dear all, I'm just working my way through the fantastic Hands On DB Vol2 book and have come to the part where I'm applying textures to objects.

However, I'm beginning to get odd errors when loading an image file. Here's the code...


When I run the code (the project and jpg are saved in the same folder) I get the warning message that it can't find "stonetile3.jpg". After clicking on the OKAY button, the code runs as normal.

I've had another error where it looks for the image file in what seems to be the default installation area for DBPro as well!

Update: actually, while typing out this post and checking my facts, it seems that my project may have been corrupted as previously saved projects (doing the same thing) seem to work. Is this normal? Is DB that buggy so soon?

Many thanks for any pointers.

T
Sharlenwar
15
Years of Service
User Offline
Joined: 4th Mar 2009
Location:
Posted: 9th Apr 2009 08:41
Is your image file located where the source code files are? If not you will need to tell DBP what directory to look into to load the image file. Alternatively if your files are in a folder called Media, you can simply go:



Let me know if you are still having issues.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 9th Apr 2009 12:08
Sometimes the IDE messes up the root path that the compiled executable is run from, I think.
Making a clean project and just copy in the old code, like you did, fixes that though - still, it's rather annoying, indeed.

It doesn't happen very often though.

Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 9th Apr 2009 12:14
Thanks, Rudolpho.
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 11th Apr 2009 08:42
Okay, yesterday I spent around an hour typing in code from the Hands on DB book and got it working, my castle looked lovely.

BUT....

...saved it as a project, switched off forgot about it. On loading up DB and my saved file from yesterday, it's completely empty! No code, nothing. Double clicking the icon is useless as well.

Is this a known bug?

I'm trying so hard to like DB, but it keeps throwing up some really glitchy stuff.
feiting shadow
18
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 11th Apr 2009 10:47
opening the dbpro file will usually open a settings file, try the DBA file... (check the kilobytes too, the larger one is the coded one). Got me too when I was just starting it

Signed
------
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 11th Apr 2009 22:11
Yeah that happens to me a lot, but rarely is your code actually gone. If opening the DBA file doesn't work, try right clicking on the .DBA file and opening it with NOTEPAD. Then copy and paste the code that should show up there into DBPro.

<---Spell casting battle game!
Monk
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 16th Apr 2009 17:36
I dont know about why it disappeared, but to load any images etc, you have to be running the .Dbpro file, not the .dba

Login to post a reply

Server time is: 2024-11-24 08:36:25
Your offset time is: 2024-11-24 08:36:25