doronron
King
I am currently attempting to merge TheLopez's M.A.D. Nukes, TheLopez's Localized Starting Techs, and monteczuma's Influence Driven War into a BtS v3.02 DLL. I have several debug errors to work through, but I need some help -- I haven't written or debugged any program code that wasn't HTML or XML in years.
So, the first error I have is:
* Error C2065: 'bNewValue': undeclared identifier
When i change this to 'iNewValue':
This resolves the error. Was this correct?
Also, the next CvCity.cpp error was:
* Error C2039: 'isAllowsNukes': is not a member of CvBuildingInfo'
When I change the code to:
This resolves the bug and continues the compile. Was this correct?
So, the first error I have is:
* Error C2065: 'bNewValue': undeclared identifier
Code:
void CvCity::setNumRealBuilding(BuildingTypes eIndex, int iNewValue)
{
setNumRealBuildingTimed(eIndex, iNewValue, true, getOwnerINLINE(), GC.getGameINLINE().getGameTurnYear());
// < M.A.D. Nukes Start >
if(bNewValue && GC.getBuildingInfo(eIndex).enablesMAD() && GC.getGameINLINE().isMADNukesEnabled())
{
GET_PLAYER(getOwnerINLINE()).setMADNukesEnabled(iNewValue);
}
// < M.A.D. Nukes End >
When i change this to 'iNewValue':
Code:
void CvCity::setNumRealBuilding(BuildingTypes eIndex, int iNewValue)
{
setNumRealBuildingTimed(eIndex, iNewValue, true, getOwnerINLINE(), GC.getGameINLINE().getGameTurnYear());
// < M.A.D. Nukes Start >
if([b]iNewValue[/b] && GC.getBuildingInfo(eIndex).enablesMAD() && GC.getGameINLINE().isMADNukesEnabled())
{
GET_PLAYER(getOwnerINLINE()).setMADNukesEnabled(iNewValue);
}
// < M.A.D. Nukes End >
This resolves the error. Was this correct?
Also, the next CvCity.cpp error was:
* Error C2039: 'isAllowsNukes': is not a member of CvBuildingInfo'
Code:
if (GC.getBuildingInfo(eIndex).isAllowsNukes())
{
GC.getGameINLINE().makeNukesValid(true);
}
When I change the code to:
Code:
if (GC.getBuildingInfo(eIndex).[b]enablesMAD[/b]())
{
GC.getGameINLINE().[b]isMADNukesEnabled()[/b];
}
This resolves the bug and continues the compile. Was this correct?