C++ Error

Joined
Sep 15, 2006
Messages
511
This code causes a this "fatal error"

Code:
c:\Documents and Settings\Scott Franks\My Documents\Game Downloads\Civilization 4\Civ4_SDK_source\CvGameCoreDLL_v161\CvGameCoreDLL\CvPlayerAI.cpp(28): fatal error C1190: managed targeted code requires '#using <mscorlib.dll>' and '/clr' option

I don't understand why this code would require mscorlib.dll.

Code:
	/////ClassicThunder/////
	//Reduces Dragon Rider's Value after curruption
	if ( GC.getGameINLINE().getProjectCreatedCount(GC.getProjectInfo(S"PROJECT_CURRUPT_RIDER_COVONANT")) == 1)
	{
		if ( GC.getUnitInfo(eUnit).getUnitClassType() == GC.getInfoTypeForString(S"UNITCLASS_DRAGON_RIDER") )
		{
			iValue -= 11;
		}
	}
	/////ClassicThunder/////
 
This code causes a this "fatal error"

Code:
c:\Documents and Settings\Scott Franks\My Documents\Game Downloads\Civilization 4\Civ4_SDK_source\CvGameCoreDLL_v161\CvGameCoreDLL\CvPlayerAI.cpp(28): fatal error C1190: managed targeted code requires '#using <mscorlib.dll>' and '/clr' option

I don't understand why this code would require mscorlib.dll.

Code:
	/////ClassicThunder/////
	//Reduces Dragon Rider's Value after curruption
	if ( GC.getGameINLINE().getProjectCreatedCount(GC.getProjectInfo(S"PROJECT_CURRUPT_RIDER_COVONANT")) == 1)
	{
		if ( GC.getUnitInfo(eUnit).getUnitClassType() == GC.getInfoTypeForString(S"UNITCLASS_DRAGON_RIDER") )
		{
			iValue -= 11;
		}
	}
	/////ClassicThunder/////

What compiler are you using?
 
S"PROJECT_CURRUPT_RIDER_COVONANT" S"UNITCLASS_DRAGON_RIDER"

Why are their S's outside the " " marks? Think that might be the cause of your issue? If not then comment the whole section out and see if it compiles ok to see if its not a compiler wide problem
 
The S designates it as a string and not a array of characters, and I'll do as you suggest.
 
I've never seen this S used any ware in the code or found it to be necessary in any modification I've made that uses hard coded string arguments. Try taking them out.
 
Back
Top Bottom