My Event Receiver code is exactly the same witht the code of other people who are already working in 1.4. It even compiles and links it perfectly, however when running it, Visual Studio jumps in with a new instance of my code with a bunch of error messages. In these messages you can read something like:- It cannot evaluate the expression: (here goes the variable)
and so on. The code of these errors is 30CX0000.
I've also tried with other examples of thirparty users, that I downloaded from this forum (which work for other people). But when trying to run them after a successful compilation the same problem shows up.
Any help will be appreciated. Just in case here I transcribe you the Event receiver code.
By the way I've checked also the Documentation of Irrlicht 1.4 and looks like what I'm doing is correct. So I cannot understand how these same programs (both mine and the ones I downloaded from here) work perfectly in 1.3.1 and they just don't in 1.4.class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(const SEvent& event)
{
/*
If the key 'W' or 'S' was left up, we get the position of the scene node,
and modify the Y coordinate a little bit. So if you press 'W', the node
moves up, and if you press 'S' it moves down.*/
if (event.EventType == irr::EET_KEY_INPUT_EVENT&&
event.KeyInput.PressedDown)
{
switch(event.KeyInput.Key)
{
case KEY_ESCAPE:{device->closeDevice();}
case KEY_SPACE:{
kursorius=!kursorius;
device->getCursorControl()->setVisible(kursorius);
kamera=!kamera;
core::vector3df targ;
if (kamera){
device->getCursorControl()->setPosition(0.5f,0.5f);
smgr->setActiveCamera(camera);
camera->setInputReceiverEnabled(true);
}
else {
camera->setInputReceiverEnabled(false);
targ=camera->getTarget();
camera2->setTarget(targ);
camera2->setPosition(camera->getPosition());
smgr->setActiveCamera(camera2);
}
}
case KEY_KEY_S:
{
// core::vector3df v = node->getPosition();
// v.Y += event.KeyInput.Key == KEY_KEY_W ? 2.0f : -2.0f;
// node->setPosition(v);
}
return true;
}
}
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = device->getGUIEnvironment();
switch(event.GUIEvent.EventType)
{
case EGET_SCROLL_BAR_CHANGED:
if (id == 104)
{
s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
atmo->setDaysPerDay((f64)pos/10.0f);//day speed
}
break;
}return true;
}
return false;
}
};
If can't find a solution to this I'll have to stick with 1.3.1 which at least is reliable and full working (and wait for 1.5).