Imperator Knoedel
Simperator Knoedel
But why isn't it a Boolean instead of an integer then?
1> CvUnit.cpp
1>CvUnit.cpp(4654): error C2086: 'CvPlot *pTargetPlot' : redefinition
1> CvUnit.cpp(4642) : see declaration of 'pTargetPlot'
// Super Forts begin *bombard*
//FAssertMsg(pBombardCity != NULL, "BombardCity is not assigned a valid value"); - Removed for Super Forts
CvPlot* pTargetPlot;
//CvPlot* pTargetPlot = pBombardCity->plot(); - Original Code
if(pBombardCity != NULL)
{
pTargetPlot = pBombardCity->plot();
}
else
{
pTargetPlot = bombardImprovementTarget(pPlot);
}
// Super Forts end
[B] CvPlot* pTargetPlot = pBombardCity->plot();[/B]
if (!isEnemy(pTargetPlot->getTeam()))
{
getGroup()->groupDeclareWar(pTargetPlot, true);
}
if (!isEnemy(pTargetPlot->getTeam()))
{
return false;
}
All I need is for someone to tell me what this error means:
Code:1> CvUnit.cpp 1>CvUnit.cpp(4654): error C2086: 'CvPlot *pTargetPlot' : redefinition 1> CvUnit.cpp(4642) : see declaration of 'pTargetPlot'
Does anyone know how CyCity's changeNoBonusCount(BonusType, iChange) works exactly? In particular, what values of iChange do what?
But why isn't it a Boolean instead of an integer then?
Firaxis coders like to do things in a way nobody understand.
It is not the only one done this way.
There are others like open borders or defensive pact done in similar fashion.
This way, if a "bool" is set by two different sources, the information isn't permanently overridden, f.e.
1. building1 blocking bonus is built -> +1.
2. building2 blocking bonus is build -> +1, now at 2.
3. building1 is destroyed -> -1, now at 1, and still correctly blocked.
Simply setting a boolean to true or false wouldn't work correctly in this case, the alternative is to loop through every building and see if one is blocking the bonus.
(I don't see a reason why open borders would have to be coded this way, though. Maybe something with teams?)
Does anyone know if it's possible to make it so that features like fallout, flood plains, etc. don't get erased when you build cities on top of them the same as bonuses?
apparently they are considered units for unitaiproduction in the handicapinfo but are not worthy of the discount type, as the same as that of a drydock, domain_sea.
How to fix this ?
How to fix this ?
Looks like something you use has symbols in the name that are not regular text.
Line 123 in CvUtil.py most likely has a statement in it that looks like this:
s.encode("latin_1")
probably with some other stuff on the line.
If so, change that to look this:
s.encode("latin_1", "backslashreplace")
This will put something like the thing in the error message into the output in the log file, like "\u23fc" (I think the "u" is in there, but I don't remember for sure) instead of what is probably a symbol character from the game fonts that this unicode value is used for in-game.
In essence, the problem is that it is trying to put a 16 bit unicode character into a 8 bit "regular" character, which it can't do. The change tells it that when there is an error it should put in the backslash prefixed unicode character number instead.
in a text file (NO SPACE: it's just for correct display on forum otherwise it shows ã).Code:& #227;
EDIT: here is a link.