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.

Dark GDK / Loading objects and images

Author
Message
Kurt
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location:
Posted: 13th Feb 2008 21:43
Hello,

I am rather new to programming in c++ although I have programmed a lot in other languages but this problem I just can't seem to solve.

I use

dbLoadObject ( "miko.x", 2 );
dbLoadImage ("title.jpg", 100);
dbLoadObject ( "colonel-x.x", 1 );
float exist = dbImageExist(100);
dbPrint (exist);



And then i recieve a 0 from "dbImageExist(100)" although I am possible to load miko.x and the colonel, but I cannot seem to load title.jpg or ANY other files than miko and colonel, although i have them all in the same folder. It isn't only with picture, as i said, but with other objects or maps so I cannot walk arround on my map as I have loaded it. Important to add is that some files I can load in other applications, but not in this, or the other way arround!

Please help, hopefully this is a noobish question so it is easily solved
MikeyK65
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Cheltenham, UK
Posted: 15th Feb 2008 13:28
Hi there

If the image definitely exists in the folder then I would see if there is an exception being thrown by the loadimage function, e.g. not enough memory, etc.

You can do this with...

try
{
dbLoadImage ("title.jpg", 100);
}
catch(Exception *e)
{
dbPrint(e->Message); // Print the error message.
}
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Feb 2008 15:11
Did this help? Post if it did or not please.

Login to post a reply

Server time is: 2024-11-17 06:51:56
Your offset time is: 2024-11-17 06:51:56