Trouble merging kmod and super forts

Lib.Spi't

Overlord of the Wasteland
Joined
Feb 12, 2009
Messages
3,708
Location
UK
ok 14 errors... I really don't know what I have done wrong...

Spoiler :
1>CvPlot.cpp(941) : error C2065: 'bErased' : undeclared identifier
1>CvPlot.cpp(951) : error C2059: syntax error : 'if'
1>CvPlot.cpp(952) : error C2143: syntax error : missing ';' before '{'
1>CvPlot.cpp(952) : error C2447: '{' : missing function header (old-style formal list?)
1>CvPlot.cpp(1000) : error C2065: 'bumped_groups' : undeclared identifier
1>CvPlot.cpp(1000) : error C2228: left of '.begin' must have class/struct/union type
1> type is ''unknown-type''
1>CvPlot.cpp(1000) : error C2228: left of '.end' must have class/struct/union type
1> type is ''unknown-type''
1>CvPlot.cpp(1000) : error C3861: 'bumped_groups': identifier not found, even with argument-dependent lookup
1>CvPlot.cpp(1000) : error C2501: 'std::sort' : missing storage-class or type specifiers
1>CvPlot.cpp(1000) : error C2365: 'std::sort' : redefinition; previous definition was a 'member function'
1>CvPlot.cpp(1000) : error C2185: 'std::sort' : illegal based allocation


well i got down to 3 but then got completely stuck...
 
Do you have the second line in your CvPlot.h?:

void verifyUnitValidPlot();
void forceBumpUnits(); // K-Mod

I did merge K-Mod and also Super Forts but not the last updates by Red Key so I'm missing a lot of code.

I have to go for today but I will have another look at tomorrow.
 
So, what's the update on the file?
What have you changed?
You say you have only 3 errors now - which ones?
Would you upload the file again with your changes?

I had a close look at the file again today but could not find a thing - sorry :crazyeye:.
 
it got better... and then it got a lot worse... So I had to back track and kinda start again!!

it has 25 errors at the moment...i had to leave it alone because it was giving me a headache last night!

here is the file and the errors:
Spoiler :
1>CvPlot.cpp
1>CvPlot.cpp(941) : error C2065: 'bErased' : undeclared identifier
1>CvPlot.cpp(951) : error C2059: syntax error : 'if'
1>CvPlot.cpp(952) : error C2447: '{' : missing function header (old-style formal list?)
1>CvPlot.cpp(997) : error C2059: syntax error : '}'
1>CvPlot.cpp(997) : error C2143: syntax error : missing ';' before '}'
1>CvPlot.cpp(997) : error C2059: syntax error : '}'
1>CvPlot.cpp(1001) : error C2143: syntax error : missing ';' before '.'
1>CvPlot.cpp(1001) : error C2501: 'bumped_groups' : missing storage-class or type specifiers
1>CvPlot.cpp(1004) : error C2059: syntax error : 'for'
1>CvPlot.cpp(1004) : error C2143: syntax error : missing ')' before ';'
1>CvPlot.cpp(1004) : error C2143: syntax error : missing ';' before '<'
1>CvPlot.cpp(1004) : error C2501: 'i' : missing storage-class or type specifiers
1>CvPlot.cpp(1004) : error C2143: syntax error : missing ';' before '++'
1>CvPlot.cpp(1004) : error C2501: 'i' : missing storage-class or type specifiers
1>CvPlot.cpp(1004) : error C2086: 'int i' : redefinition
1> CvPlot.cpp(1004) : see declaration of 'i'
1>CvPlot.cpp(1004) : error C2059: syntax error : ')'
1>CvPlot.cpp(1005) : error C2143: syntax error : missing ';' before '{'
1>CvPlot.cpp(1005) : error C2447: '{' : missing function header (old-style formal list?)
1>CvPlot.cpp(1013) : error C2059: syntax error : '}'
1>CvPlot.cpp(1013) : error C2143: syntax error : missing ';' before '}'
1>CvPlot.cpp(1013) : error C2059: syntax error : '}'
1>CvPlot.cpp(1020) : error C2143: syntax error : missing ';' before '{'
1>CvPlot.cpp(1020) : error C2447: '{' : missing function header (old-style formal list?)
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1>Stop.


I think I walked myself back to square one in the end... which is why I stopped because I completely lost the plot! (pun not intended :p)
 

Attachments

  • CvPlot.rar
    38.6 KB · Views: 60
I think indeed that you were tired and that for each correction you made, you have added two other mistakes!

Let's try to get back on tracks. Since I'm also a bit lost and desperate, I would like you to do two things:

1) Take this file enclosed, rename it appropriately and try to compile. List of errors?

2) If errors, take my own file from yesterday and try to compile. If list of errors is enormous, forget it; if not, post the list.

Thanks.

PS: I've tried to see if another file could be involved, but the only clues we have are 'bErased' and 'bumped_groups' and both only appear in CvPlot.cpp in my files.
 
hahaha!
Well done that fixed it no errors there :)


EDIT: Ok Never mind, I think I fixed these ones!
CvUnits is my next screw up! :D

Spoiler :
1>CvUnit.cpp
1>CvUnit.cpp(5435) : error C2039: 'groupDeclareWar' : is not a member of 'CvSelectionGroup'
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvSelectionGroup.h(17) : see declaration of 'CvSelectionGroup'
1>CvUnit.cpp(5436) : warning C4138: '*/' found outside of comment
1>CvUnit.cpp(5436) : error C2059: syntax error : '/'
1>CvUnit.cpp(5439) : error C2143: syntax error : missing ';' before '{'


I have attached the header and source file I am going to look at it to see if i find anything obvious but I probably won't touch it as I usually make it worse! :D

Thanks for your help with this I do appreciate it!
 

Attachments

  • CvUnit.rar
    76.8 KB · Views: 69
Next up is the file that I was pretty sure i screwed up the merge on cause it is an AI file and I always mess these up :)

CvUnitAI.cpp
30 errors
Spoiler :
1>CvUnitAI.cpp
1>CvUnitAI.cpp(17056) : error C3861: 'bombardTarget': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17056) : error C3861: 'plot': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17060) : error C2227: left of '->AI_attackOdds' must point to class/struct/union
1> type is ''unknown-type''
1>CvUnitAI.cpp(17060) : error C3861: 'getGroup': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17063) : error C2227: left of '->getBombardTurns' must point to class/struct/union
1> type is ''unknown-type''
1>CvUnitAI.cpp(17063) : error C3861: 'getGroup': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17064) : error C2501: 'iBase' : missing storage-class or type specifiers
1>CvUnitAI.cpp(17064) : error C2374: 'iBase' : redefinition; multiple initialization
1> CvUnitAI.cpp(17061) : see declaration of 'iBase'
1>CvUnitAI.cpp(17064) : error C3861: 'iBase': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17065) : error C3861: 'iBase': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17066) : error C2227: left of '->AI_compareStacks' must point to class/struct/union
1> type is ''unknown-type''
1>CvUnitAI.cpp(17066) : error C3861: 'getGroup': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17068) : error C2059: syntax error : 'if'
1>CvUnitAI.cpp(17069) : error C2143: syntax error : missing ';' before '{'
1>CvUnitAI.cpp(17069) : error C2447: '{' : missing function header (old-style formal list?)
1>CvUnitAI.cpp(17073) : error C2059: syntax error : 'else'
1>CvUnitAI.cpp(17074) : error C2143: syntax error : missing ';' before '{'
1>CvUnitAI.cpp(17074) : error C2447: '{' : missing function header (old-style formal list?)
1>CvUnitAI.cpp(17104) : error C2059: syntax error : '}'
1>CvUnitAI.cpp(17104) : error C2143: syntax error : missing ';' before '}'
1>CvUnitAI.cpp(17104) : error C2059: syntax error : '}'
1>CvUnitAI.cpp(17105) : error C2143: syntax error : missing ';' before '}'
1>CvUnitAI.cpp(17105) : error C2059: syntax error : '}'
1>CvUnitAI.cpp(17110) : error C2143: syntax error : missing ';' before '{'
1>CvUnitAI.cpp(17110) : error C2447: '{' : missing function header (old-style formal list?)
1>CvUnitAI.cpp(17218) : error C2143: syntax error : missing ',' before 'if'
1>CvUnitAI.cpp(17221) : error C2143: syntax error : missing ')' before '{'
1>CvUnitAI.cpp(17221) : error C2143: syntax error : missing ';' before '{'


once again cheers :D
 

Attachments

  • CvUnitAI.rar
    105.7 KB · Views: 49
I think this one should be easy: again, rename the file and recompile to see if I'm correct.
 
This one is very tricky because K-Mod and Super Forts clash here. This is beyond my capabilities as I don't know C++.

Personally, I have crushed Super Forts with K-Mod. For you, at least until somebody can do a proper merge for you, I would do the contrary and keep in full Red Key's version for two functions that I have reproduced here:

Spoiler :
// Conflict between K-Mod and Super Forts: this is Super Forts version
bool CvUnitAI::AI_bombardCity()

// Conflict between K-Mod and Super Forts: this is Super Forts version
bool CvUnitAI::AI_cityAttack(int iRange, int iOddsThreshold, bool bFollow)


So try that file and tell me what errors are remaining, if any.
 
ok I remerged and got 8 errors in the AI

Spoiler :
1>CvUnitAI.cpp(17049) : error C2039: 'AI_sumStrength' : is not a member of 'CvPlot'
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvPlot.h(30) : see declaration of 'CvPlot'
1>CvUnitAI.cpp(17078) : error C2039: 'AI_sumStrength' : is not a member of 'CvPlot'
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvPlot.h(30) : see declaration of 'CvPlot'
1>CvUnitAI.cpp(17112) : error C2511: 'bool CvUnitAI::AI_cityAttack(int,int,bool)' : overloaded member function not found in 'CvUnitAI'
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvUnitAI.h(12) : see declaration of 'CvUnitAI'
1>CvUnitAI.cpp(17218) : error C2143: syntax error : missing ',' before 'if'
1>CvUnitAI.cpp(17221) : error C2143: syntax error : missing ')' before '{'
1>CvUnitAI.cpp(17221) : error C2143: syntax error : missing ';' before '{'
 
OK, AI_sumStrength has been disabled by K-Mod.

To continue the experiment, edit CvPlot.h, find AI_sumStrength and cancel the commenting out by Karadoc. Keep a note for yourself.

Then, edit CvUnitAI.h, find AI_cityAttack and replace the line as follows (as it is in Super Forts):
bool AI_cityAttack(int iRange, int iOddsThreshold, bool bFollow = false);
Keep a note for yourself.

Try again to compile.
 
6 errors

Spoiler :
1>CvUnitAI.cpp
1>CvUnitAI.cpp(491) : error C2660: 'CvUnitAI::AI_cityAttack' : function does not take 4 arguments
1>CvUnitAI.cpp(17158) : error C3861: 'AI_finalOddsThreshold': identifier not found, even with argument-dependent lookup
1>CvUnitAI.cpp(17218) : error C2143: syntax error : missing ',' before 'if'
1>CvUnitAI.cpp(17221) : error C2143: syntax error : missing ')' before '{'
1>CvUnitAI.cpp(17221) : error C2143: syntax error : missing ';' before '{'


I think that first error might be to do with the fact we got rid of the 'flag' bit...
 
This is becoming experimental!...

Edit CvUnitAI.h again, find AI_finalOddsThreshold, cancel the commenting out by K-Mod, keep a note for yourself...

Take the new CvUnitAI.cpp file attached, re-compile...
 
WOOOH lets get experiMENTAL!!

6 errors..
Spoiler :
1>CvUnitAI.cpp
1>CvUnitAI.cpp(516) : error C2511: 'bool CvUnitAI::AI_follow(void)' : overloaded member function not found in 'CvUnitAI'
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvUnitAI.h(12) : see declaration of 'CvUnitAI'
1>CvUnitAI.cpp(17260) : error C2143: syntax error : missing ',' before 'if'
1>CvUnitAI.cpp(17263) : error C2143: syntax error : missing ')' before '{'
1>CvUnitAI.cpp(17263) : error C2143: syntax error : missing ';' before '{'
 
Again, take the h file, in the beginning, find this:

//bool AI_follow();
bool AI_follow(bool bFirst = true); // K-Mod
// K-Mod

Reverse to the original, etc...
 
4 errors WOW never had this!

Spoiler :
CvPlayer.cpp
1>c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\FFreeListTrashArray.h(238) : error C2259: 'CvUnitAI' : cannot instantiate abstract class
1> due to following members:
1> 'bool CvUnit::AI_follow(bool)' : pure virtual function was not defined
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvUnit.h(964) : see declaration of 'CvUnit::AI_follow'
1> C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\xtree(267) : while compiling class-template member function 'CvUnitAI *FFreeListTrashArray<T>::add(void)'
1> with
1> [
1> T=CvUnitAI
1> ]
1> C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\xmemory(156) : while compiling class-template member function 'FFreeListTrashArray<T>::~FFreeListTrashArray(void)'
1> with
1> [
1> T=CvUnitAI
1> ]
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvPlayer.h(1426) : see reference to class template instantiation 'FFreeListTrashArray<T>' being compiled
1> with
1> [
1> T=CvUnitAI
1> ]
1>c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\FFreeListTrashArray.h(513) : error C2259: 'CvUnitAI' : cannot instantiate abstract class
1> due to following members:
1> 'bool CvUnit::AI_follow(bool)' : pure virtual function was not defined
1> c:\Games\CivIV\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\K-Fallout\Assets\CvGameCoreDLL\CvUnit.h(964) : see declaration of 'CvUnit::AI_follow'
1> CvPlayer.cpp(17788) : see reference to function template instantiation 'void ReadStreamableFFreeListTrashArray<CvUnitAI>(FFreeListTrashArray<T> &,FDataStreamBase *)' being compiled
1> with
1> [
1> T=CvUnitAI
1> ]
 
In CvUnit.h this time, find this

//virtual bool AI_follow() = 0;
virtual bool AI_follow(bool bFirst = true) = 0; // K-Mod

revert to the original...
 
Top Bottom