Tutorial 15 : Error at getSceneNodeFromType

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
RVM
Posts: 13
Joined: Sun Mar 27, 2011 6:14 pm
Location: France
Contact:

Tutorial 15 : Error at getSceneNodeFromType

Post by RVM »

Hello,

I work with the tutorial 15 and I encounter a problem with the function getSceneNodeFromType :

Code: Select all

 
core::array<scene::ISceneNode *> nodes;
        smgr->getSceneNodesFromType(scene::ESNT_ANY, nodes);
 
Get this error :
..\SDK\irrlicht-1.7.3\include\ISceneManager.h|1053|note: no known conversion for argument 2 from 'irr::core::array<irr::scene::ISceneNode*>' to 'irr::scene::ISceneNode*'|
Is there a solution for this ?

Thanks in advance,
RVM
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
CuteAlien
Admin
Posts: 9929
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Tutorial 15 : Error at getSceneNodeFromType

Post by CuteAlien »

Completely confusing error. getSceneNodesFromType does not expect a 'irr::scene::ISceneNode*' so no idea why it tries to convert there in your case. Also works with default Irrlicht that way (and that function seems to look the same since at least Irrlicht 1.4, didn't check older versions now).

Please open ISceneManager.h (in the Irrlicht include folder) and check how your getSceneNodesFromType declaration looks like. I have the feeling you changed it for some reason.

Otherwise please tell us which compiler you are using. I just tried VS 2010 on Windows XP right now.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
RVM
Posts: 13
Joined: Sun Mar 27, 2011 6:14 pm
Location: France
Contact:

Re: Tutorial 15 : Error at getSceneNodeFromType

Post by RVM »

Hi,

The declaration of getSceneNodesFromType is the following one :

Code: Select all

 
virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type,
                                core::array<scene::ISceneNode*>& outNodes,
                                ISceneNode* start=0) = 0;
 
I use MinGW with gcc version 4.6.2 under Windows 7 64b.

But I have found how to correct this error, I had to recompile Irrlicht and it was ok.

Many thanks,
RVM
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
Post Reply