salaminizer
Colorado Internacional
The game is crashing when initializing. A quick (before it crashes lol) "attach to process" with the Debug DLL shows me that the game crashes when loading PromotionInfos.xml so it must be it.
I've added 2 new fields to the promotions: ActivateChance and ActivatePromotion.
In the schema:
In the XML:
PROMOTION_STATUS_WARPED is the Type of another promotion
The read, write and declarations are all there in the CvInfos.h and CvInfos.cpp
I think the problem is getting the text from the XML.
First I added
in the first read function.
Then I saw that when it was text sometimes the &variable was replaced with szTextVal and tried the same. Still crashing.
Then I saw that PromotionPrereq was in the second read function (read2). So I moved my tag there too, resulting in:
But it is still crashing when initializing the game.
Any ideas? Thanks.
I've added 2 new fields to the promotions: ActivateChance and ActivatePromotion.
In the schema:
Code:
<ElementType name="iActivateChance" content="textOnly" dt:type="int"/>
<ElementType name="iActivatePromotion" content="textOnly"/>
In the XML:
Code:
<iActivateChance>100</iActivateChance> <iActivatePromotion>PROMOTION_STATUS_WARPED</iActivatePromotion>
PROMOTION_STATUS_WARPED is the Type of another promotion
The read, write and declarations are all there in the CvInfos.h and CvInfos.cpp
I think the problem is getting the text from the XML.
First I added
Code:
pXML->GetChildXmlValByName(&m_iActivatePromotion, "iActivatePromotion");
in the first read function.
Then I saw that when it was text sometimes the &variable was replaced with szTextVal and tried the same. Still crashing.
Then I saw that PromotionPrereq was in the second read function (read2). So I moved my tag there too, resulting in:
Code:
pXML->GetChildXmlValByName(szTextVal, "iActivatePromotion");
m_iActivatePromotion = GC.getInfoTypeForString(szTextVal);
But it is still crashing when initializing the game.
Any ideas? Thanks.