SDK .dll compiling errors help :-)

ok I got over this problem by deleting references to partisans from the extrapillage code, I can now successfully compile the .dll, but I get 2 warnings:

1>CvUnit.cpp
1>CvUnit.cpp(4884) : warning C4101: 'iK' : unreferenced local variable
1>CvUnit.cpp(4884) : warning C4101: 'iJ' : unreferenced local variable

When I try to run the game with the new .dll I get a bunch of xml errors:

Spoiler :
failed loading XML file xml\Units/CIV4UnitClassINfos.xml.
LoadXML call failed for Units/CIV4UnitClassInfos.xml.
Tag: UNITCLASS_GREAT_PROTECTOR in Info class was incorrect
Current XML file is: xml\GameInfo/CIV4SpecialistInfos.xml
Tag: UNITCLASS_SCIENTIST in info class was incorrect
Current XML file is: xml\GameInfo/CIV4SpecialistInfos.xml

Then it goes through each of the specialist types, I am assuming that these are jsut from the broken file.


LoadXML call failed for Units/CIV4UnitClassInfos.xml.
Failed Loading XML file xml\Units/CIV4AnimationInfos.xml
Failed Loading XML file xml\Units/CIV4AnimationPathInfos.xml
LoadXML call failed for Units/CIV4AnimationPathInfos.xml.
Failed Loading XML file xml\Units/CIV4PromotionInfos.xml
LoadXML call failed for Units/CIV4PromotionInfos.xml.

Allocating zero or less memory in
CvXMLLoadUtility::SetVariableListTagPair
Current XML file is: xml\Civilizations/CIV4TraitInfos.xml
There are more siblings than memory allocated for them in
CvXMLLoadUtility::SetVariableListTagPair
Current XML file is: xml\Civilizations/CIV4TraitInfos.xml

then onto promotions and some other files, if you want the exhaustive list I can continue later.

Cheers guys


Could the 2 be related...any other thoughts on a solution?

The strange thing is that in the civilopedia (At Start Menu) The Units and Promotions are gone, but the leaders and their traits seen to display fine...?!?!?
 
I don't know much about SDK, but it looks like either you still have to delete stuff or you deleted too much!

The line is referred as 4884 so have a look at the file if this can relate to your UNITCLASS_GREAT_PROTECTOR.

Has a tag been added in the xml\GameInfo/CIV4SpecialistInfos.xml file to be linked to the CIV4UnitClassInfos.xml file?

As soon as that error is reached by the game, the complete file of Units is not loaded, resulting in hundreds of other errors. This looks frightening but it is possible that it is just one error that causes that and when fixed all other errors would then disappear.

You say "The strange thing is that in the civilopedia (At Start Menu) The Units and Promotions are gone, but the leaders and their traits seen to display fine...?!?!? ": as such it is normal, some files were loaded successfully, others not.
 
That is the referenced code lines.

Spoiler :
bool CvUnit::pillage()
{
CvWString szBuffer;
int iPillageGold;
long lPillageGold;
ImprovementTypes eTempImprovement = NO_IMPROVEMENT;
RouteTypes eTempRoute = NO_ROUTE;
/*** EXTRAPILLAGE 04/21/08 by DPII ***/
int iI, iJ, iK;
PlayerTypes ePillagedPlayer = plot()->getOwner();
/************************************/


The unit class file is the same as normal, no extra tags added there..

What I meant by strange, is that trait infos is referenced as an error, yet the leaders and the trait display fine, they are not broken like the units and promotions..
 
Do you get any reference to iJ or iK after that in the same section?

This seems to be unrelated to your xml errors.

Could you attach your UnitInfos, UnitclassInfos and CIV4SpecialistInfos.xml files to have a look at? :scan: (no promise though...:crazyeye:)
 
Ok, looking again at your first xml error, it is the UnitClassInfos file which is wrong, then it says your UNITCLASS_GREAT_PROTECTOR is wrong in the SpecialistInfos file because it is not loaded and so on.

So the problem is not with the UNITCLASS_GREAT_PROTECTOR but most probably with the UNITCLASS_GREAT_SPY that you have taken out from the UnitInfos file but NOT from the UnitClassInfos file and that is a problem! Take it out and see if this file loads properly now.

By the way, is it normal that for the <Type>UNITCLASS_PLASMA_MORTAR</Type> there is a <DefaultUnit>UNIT_LASER_MARINE</DefaultUnit>? Probably not...
 
1>CvUnit.cpp
1>CvUnit.cpp(4884) : warning C4101: 'iK' : unreferenced local variable
1>CvUnit.cpp(4884) : warning C4101: 'iJ' : unreferenced local variable

This is not a big deal. It's just telling you that you have initialized those two variables but aren't using them. Delete them from line 4884 and this warning message will go away.
 
Ok, looking again at your first xml error, it is the UnitClassInfos file which is wrong, then it says your UNITCLASS_GREAT_PROTECTOR is wrong in the SpecialistInfos file because it is not loaded and so on.

So the problem is not with the UNITCLASS_GREAT_PROTECTOR but most probably with the UNITCLASS_GREAT_SPY that you have taken out from the UnitInfos file but NOT from the UnitClassInfos file and that is a problem! Take it out and see if this file loads properly now.

By the way, is it normal that for the <Type>UNITCLASS_PLASMA_MORTAR</Type> there is a <DefaultUnit>UNIT_LASER_MARINE</DefaultUnit>? Probably not...

haha no that was a code screw up on my part :) one I have been meaning to fix thanks for the reminder :)

and thanks I shall give that a go :) Ok I am going to try and sweep out every reference of Great Spy that I can find and see if that fixes the prblem :)

in fact I will try the opposite and try to put the great spy back in....might be quicker..

hmmm no getting rid of all the references I could find to great spies did not seem to work......grrr that seemed like a really good idea too!
 
Man, one step at a time!

What are the errors now?
 
Well, you're not helping.

What if you just did the two corrections to the file UnitClassInfos that I suggested above? What would be the errors then? (that there are errors is not a fatality: you can solve them one by one).
 
no I did that first and there was no change, so then I went through and removed all the GS references, and still the same errors minus the reference to GS.

The plasma mortar bit isn't an issue, that has been there ages, doesn't break anything, the unit is jsut wrong

oh I am used to fixing errors hehe, it is just annoying when the error messages don't reveal where the problem is :p
 
Ok, but what are the errors now exactly. You might think that they are the same but they shouldn't be the same. If they are, well, I give up.
 
Sorry, if you don't provide the new set of errors, then I'm out.
 
ok I am now working under the theory that the issue is taht the Great Protector replaced the Great Artist, as fury road has 'safety' instead of culture.

So I did a find and replace for all artist references with protector, to see if this would provide a fix.

When compiling the .dll I now get this error:

Spoiler :
1>BetterBTSAI.cpp
1>c1xx : fatal error C1001: INTERNAL COMPILER ERROR
1> (compiler file 'msc1.cpp', line 2701)
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.


any thoughts? I have no idea what the msc1.cpp is?!?! Ok well the solution to this problem was delete the 'release' folder and build again.

nope....same unitclassinfo errors still......hmmmmmm

ok so I now have it seeing that UNITCLASS_PROTECTOR is wrong, rather than GREAT_PROTECTOR

however this is only really stirring the problem rather than seperating it out....still no closer to figuring out why it does not like my unitclassinfo file...
 
Top Bottom