ClassicThunder
Prince
- Joined
- Sep 15, 2006
- Messages
- 511
I'm trying to add a new feature to my mod.
In enums.cpp I added this.
And where I load the xml I added this.
Which gives me this error
So how do go from szTextVal to the corresponding enumeration I created?
In enums.cpp I added this.
Code:
//ClassicThunder
enum DllExport UnitElementType
{
NO_ELEMENT = -1,
EARTH_ELEMENT = 0,
FIRE_ELEMENT = 1,
WATER_ELEMENT = 2,
};
And where I load the xml I added this.
Code:
//ClassicThunder
pXML->GetChildXmlValByName(szTextVal, "ElementType");
m_ePossibleElementTypes = pXML->FindInInfoClass(szTextVal);
//ClassicThunder
Which gives me this error
Code:
c:\Users\Scott Franks\AppData\Roaming\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Rise from Ashes\CvGameCoreDLL\CvInfos.cpp(2318): error C2440: '=' : cannot convert from 'int' to 'UnitElementType'
So how do go from szTextVal to the corresponding enumeration I created?