Display a windows message box when a texture can't be found

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
eviral
Posts: 91
Joined: Mon Oct 25, 2004 10:25 am

Display a windows message box when a texture can't be found

Post by eviral »

for debugging purposes, il would like while my game is loading external files (models, bitmaps, textures...) be able to display a windows message box saying "File wall.bmp can't be found !" to avoid my irrlicht game to crash without telling me the missing file.

How can i do that ?

Thanks

Eviral
CZestmyr
Posts: 72
Joined: Sat Feb 12, 2005 7:11 pm
Location: Czech Republic
Contact:

Post by CZestmyr »

I'd place a bet on something like this:

Code: Select all

c8* filename = "texture.tga";
ITexture* texture = driver->getTexture(filename);
if (!texture){
    //Display the message box, where you also display the filename variable contents
}
You would, of course need to know the names of all your textures and load them manually.
Bugfree is not a synonym to dumbass-resistant

My irrlicht files and tutorials
My music in mp3
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

IGUIEnvironment addMessageBox() that will pop up an Irrlicht message box with an ok button which will basically do the same thing as you're asking i should think
Image Image Image
Post Reply