Page 1 of 1

EventReceiver error in CodeBlock

Posted: Sat May 23, 2009 5:05 pm
by paio458
forgive my bad English


class MyEventReceiver : public IEventReceiver
{
public:

virtual bool OnEvent(const SEvent& event)
{
if (event.EventType == irr::EET_KEY_INPUT_EVENT)
KeyIsDown[event.SKeyInput.Key] = event.SKeyInput.PressedDown;
return false;
}


I'm using codeblock and Irrlichter 1.5
when compiling the example 4 gives me this error:


In member function `virtual bool MyEventReceiver::OnEvent(const irr::SEvent&)':|
C:\irrlicht-1.5\mios\moverpsj\main.cpp|18|error: invalid use of `struct irr::SEvent::SKeyInput'
C:\irrlicht-1.5\mios\moverpsj\main.cpp|18|error: invalid use of `struct irr::SEvent::SKeyInput'
=== Build finished: 2 errors, 0 warnings ===


any idea why the error

Posted: Sat May 23, 2009 5:14 pm
by seventhtear
Not SKeyInput but KeyInput

Posted: Sat May 23, 2009 5:55 pm
by paio458
thanks
Fixed and running