I'm trying to integrate Mylon's Enhanced Sized Cities into my mod, but I keep getting strange errors when trying to compile...
Error code:
in the CvCity.h file, I've added the following:
under the "public:" section of the declaration.
In the CvCity.cpp, at line 1060, I have the copied method:
Error code:
Spoiler :
CvCity.cpp(1060) : error C2511: 'int CvCity::getNumPlots(void)' : overloaded member function not found in 'CvCity'
c:\Users\Adder\Desktop\Collection\CvGameCoreDLL\CvCity.h(17) : see declaration of 'CvCity'
c:\Users\Adder\Desktop\Collection\CvGameCoreDLL\CvCity.h(17) : see declaration of 'CvCity'
in the CvCity.h file, I've added the following:
Code:
int getNumPlots() const;
In the CvCity.cpp, at line 1060, I have the copied method:
Spoiler :
// Mylon - enhanced city sizes
int CvCity::getNumPlots()
{
int iRadius;
int var_city_plots;
if (getCultureLevel() == -1)
{
return 9;
}
iRadius = GC.getCultureLevelInfo(getCultureLevel()).getCityRadius();
switch (iRadius)
{
case 4:
var_city_plots = NUM_CITY_PLOTS;
break;
case 3:
var_city_plots = NUM_CITY_PLOTS_3;
break;
case 2:
var_city_plots = NUM_CITY_PLOTS_2;
break;
case 1:
var_city_plots = 9;
break;
default:
var_city_plots = NUM_CITY_PLOTS_2;
break;
}
return(var_city_plots);
} // Mylon - end enhanced city sizes
int CvCity::getNumPlots()
{
int iRadius;
int var_city_plots;
if (getCultureLevel() == -1)
{
return 9;
}
iRadius = GC.getCultureLevelInfo(getCultureLevel()).getCityRadius();
switch (iRadius)
{
case 4:
var_city_plots = NUM_CITY_PLOTS;
break;
case 3:
var_city_plots = NUM_CITY_PLOTS_3;
break;
case 2:
var_city_plots = NUM_CITY_PLOTS_2;
break;
case 1:
var_city_plots = 9;
break;
default:
var_city_plots = NUM_CITY_PLOTS_2;
break;
}
return(var_city_plots);
} // Mylon - end enhanced city sizes