Dev C++ Map Error

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
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Dev C++ Map Error

Post by Robomaniac »

Here's the code from the other forum. I am trying to load a Quake3 map, but the mesh is not found. Thanks for any help. Here's the code for the loading area of the program.

device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");


scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0;

if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));

if (node)
node->setRelativePosition(core::vector3df(-1300,-144,-1249));

camera = smgr->addCameraSceneNodeFPS();

device->getCursorControl()->setVisible(false);

int lastFPS = -1;

if (!mesh)
printf("Mesh not found!!\n");

~~The Robomaniac
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I think the reason is that the file is not found. To be sure, try to copy the file map-20kdm2.pk3 into the directory where your .exe is and change

device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");

to

device->getFileSystem()->addZipFileArchive("map-20kdm2.pk3");

In the next release warnings and errors will be printed even into the console window, which will help you finding this types of problems easily.
Caecus
Posts: 36
Joined: Fri Aug 22, 2003 6:33 am
Location: California, USA

Post by Caecus »

w00t on the warnings and errors in the console window. Great idea :)
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Thanks for the help, that worked.

~~The Robomaniac
Post Reply