[sdk Compiling Problem] C2660

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
When compiling, I'm getting these errors:

Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Sid Meier's Civilization 4\Warlords\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvSelectionGroup.cpp
cvselectiongroup.cpp(1242) : error C2660: 'CvSelectionGroup::groupAttack' : function does not take 3 arguments
cvselectiongroup.cpp(4154) : error C2660: 'CvSelectionGroup::AI_getBestGroupAttacker' : function does not take 2 arguments
Process terminated with status 1 (0 minutes, 4 seconds)
2 errors, 0 warnings

The error I'm getting is with Dale's Combat Mod. I'm trying to merge it with Better AI.

Here is the code around line 1242:

Code:
// Grave's ModComp Dale - Stack Attack: use required group attack method whether concept on or off
			if(DCMStackAttack)
			{
				if (groupStackAttack(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, headMissionQueueNode()->m_data.iFlags))
				{
				bDone = true;
				}
			} else {
				if (groupAttack(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, headMissionQueueNode()->m_data.iFlags))
				{
					bDone = true;
				}
			}

Here is the code around line 4154:

Code:
	if (getNumUnits() > 0)
	{
		if ((getDomainType() == DOMAIN_AIR) || (stepDistance(getX(), getY(), pDestPlot->getX_INLINE(), pDestPlot->getY_INLINE()) == 1))
		{
			if ((iFlags & MOVE_DIRECT_ATTACK) || (getDomainType() == DOMAIN_AIR) || (generatePath(plot(), pDestPlot, iFlags) && (getPathFirstPlot() == pDestPlot)))
			{
				if (AI_getBestGroupAttacker(pDestPlot, true) != NULL)
				{
					if (groupDeclareWar(pDestPlot))
					{
						return true;
					}


Any ideas? I'll try and provide more details if needed.
 
For the time being, I put a // in front of lines 1242 and 4154 and it seems to be compiling fine now. The DCM code that's giving me troubles involves stacked combat, which I probably won't even use anyway.
 
Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Sid Meier's Civilization 4\Warlords\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvSelectionGroup.cpp
[b]cvselectiongroup.cpp(1242) : error C2660: 'CvSelectionGroup::groupAttack' : function does not take 3 arguments
cvselectiongroup.cpp(4154) : error C2660: 'CvSelectionGroup::AI_getBestGroupAttacker' : function does not take 2 arguments[/b]
Process terminated with status 1 (0 minutes, 4 seconds)
2 errors, 0 warnings

The errors say that the groupAttack function does not take three arguments. You're passing groupAttack three arguments, but the error message says that the function is expecting a different amount. Looking at the SDK I have, groupAttack truly does only want three arguments, so I'm guessing perhaps Dale modified the groupAttack function arguments? Check out CvSelectionGroup.h and see what the groupAttack function declaration looks like.


I think the same thing goes for CvSelectionGroup::AI_getBestGroupAttacker. Check out what that function looks like in the CvSelectionGroupAI.h file.

Edit:

BTW, groupAttack typically has three arguments in Vanilla, not sure about WL.
 
Cool, thanks. I'll look into it. I may just end up removing all of Dale's Stacked Combat anyway.

It's odd, because with the regular 2.08 files this compiles no problem. But when you try and merge it with Better AI you get this error.
 
Top Bottom