Teg_Navanis
King
- Joined
- Jan 21, 2006
- Messages
- 737
I just tried to create two new python events using the SDK. But every time I start a map with the modified CvGameCoreDLL, I get a crash to desktop.
Here's what I did:
In CvDLLEventReporterIFace.h, I added the lines
I also changed some other files (CvEventManager.py, CvUnit.cpp), but I removed those changes again to verify that it is indeed these two lines that lead to the crash.
Now to the question: Did I miss another file that I have to edit to make it work? Is there an error in my code? Is it even possible to add new python events?
Here's what I did:
In CvDLLEventReporterIFace.h, I added the lines
Code:
virtual void combatBegin(CvUnit* pAttacker, CvUnit* pDefender, int idefenderOdds) = 0;
virtual void combatHit(CvUnit* pAttacker, CvUnit* pDefender, int iIsAttacker, int iDamage) = 0;
I also changed some other files (CvEventManager.py, CvUnit.cpp), but I removed those changes again to verify that it is indeed these two lines that lead to the crash.
Now to the question: Did I miss another file that I have to edit to make it work? Is there an error in my code? Is it even possible to add new python events?