Gui image does not load(SOLVED)

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
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Gui image does not load(SOLVED)

Post by 3DModelerMan »

Hi I have been working on a main menu for my game,
It has an image in the background, but when I try to load my image
it won't work I get this error on the console window

Code: Select all

Cannot load file .../.../.../Pingy3,/gui/bkg.bmp
I am new here so, could be a beginers mistake, but I checked the path to the file like a dozen times and could'nt get it to work... um here's my code

Code: Select all

   guienv->addStaticText(L"Welcome to Pingy world!!!",
        rect<int>(5,4,250,25), true);
   //add the buttons
    guienv->addButton(rect<s32>(25,210,150,240), 0, 101, L"Play.");
    guienv->addButton(rect<s32>(25,250,150,280), 0, 102, L"How to play.");
    guienv->addButton(rect<s32>(25,290,150,320), 0, 103, L"Quit...");
    //add an image
    guienv->addImage(driver->getTexture(".../.../.../.../pingy3,/gui/bkg.bmp"),
    position2d<int>(10,10));
Does the

Code: Select all

 driver->getTexture 
Function corespond to any variable that might have a different name?.Or (I use code::blocks IDE) do I have to set some working
directory thing different?.

Thanks.
Last edited by 3DModelerMan on Thu May 29, 2008 3:39 pm, edited 1 time in total.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I'm not sure if a "," character is allowed in filenames. But it could also be the typical MSVC wrong working dir error.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Nope does'nt work.

Post by 3DModelerMan »

I tried it both It actualy prints this (I got my message wrong)


Cannot open file of texture.../.../pingy3/bkg.png


I changed to png.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Post by radical-dev »

Hi!
.../.../.../.../pingy3,/gui/bkg.bmp
if the points should go up one directory, try only 2 point like this:

Code: Select all

../../../../pingy3,/gui/bkg.bmp
Dunno if this solves your problem.

Greetings
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Uh, that's an even better hint on forbidden file access techqniues :lol: I really didn't spot that one.
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Post by radical-dev »

Hehe :lol:
Post Reply