Error using irrlicht 1.4 !!

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
patrickniceboy
Posts: 23
Joined: Fri Apr 27, 2007 3:22 pm
Location: Brazil

Error using irrlicht 1.4 !!

Post by patrickniceboy »

using 1.3 no problem but using 1.4 i got some errors

error C2664: 'irr::scene::ISceneManager::addHillPlaneMesh' : cannot convert parameter 3 from 'irr::core::dimension2d<T>' to 'const irr::core::dimension2d<T> &'
with
[
T=irr::s32
]
and
[
T=irr::u32
]
Reason: cannot convert from 'irr::core::dimension2d<T>' to 'const irr::core::dimension2d<T>'
with
[
T=irr::s32
]
and
[
T=irr::u32
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

Code: Select all

 IAnimatedMesh *plane = smgr->addHillPlaneMesh("test",dimension2d<f32>(120,30),dimension2d<s32>(20,20));

error C2259: 'MyEventReceiver' : cannot instantiate abstract class
due to following members:
'bool irr::IEventReceiver::OnEvent(const irr::SEvent &)' : is abstract
c:\program files\microsoft visual studio 8\vc\include\ieventreceiver.h(256) : see declaration of 'irr::IEventReceiver::OnEvent'

Code: Select all

MyEventReceiver receiver;
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

1) You're passing a core::dimension2d<s32>, aka core::dimension2di. The method now requires a core::dimension2d<u32> (well, a reference to one). There's no alias for that. You'll have to change the code that calls the method to declare a core::dimension2d<u32>.


2) Just change your MyEventReceiver's OnEvent method signature from:

OnEvent(SEvent event)

to

OnEvent(const SEvent & event)
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
patrickniceboy
Posts: 23
Joined: Fri Apr 27, 2007 3:22 pm
Location: Brazil

Post by patrickniceboy »

Thank you !! :D
Post Reply