Page 1 of 1

Geme crashes...

Posted: Tue Feb 14, 2006 11:29 pm
by Fhqwhgads
I have no idea at all as to why it does. It compiles fine in Vc++ 2006 express. My code...

http://www.christiangaming.org/graphics ... iecode.zip

Posted: Wed Feb 15, 2006 9:49 pm
by iam13013
The problem was in your event receiver...

Change EventReceiver.h to

Code: Select all

#include "headers.h"

class MyEventReceiver : public IEventReceiver
{
public:
bool keyEnter;
bool click;

	virtual bool OnEvent(SEvent event)
	{	
		if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
		{
			if(event.KeyInput.Key == irr::KEY_RETURN)
			{			
				if(!keyEnter)
				keyEnter = true;
			};
		};
	
	return false;
	};

Then, in GameCore.h change

MyEventReceiver* events;
to
MyEventReceiver events;

then change
irrDevice->setEventReceiver(events);
to
irrDevice->setEventReceiver(&events);

That should work...