Questions on the DLL

I also still don't understand how your updateTechCommerce() function works without a tech as an argument. I really think you should reevalute that code and consider setting it up so that the tech type is passed as an argument Ie make it CvCity::updateTechCommerce(TechTypes eTech)

I have three functions. updateTechCommerce() loops through all the techs, getTechCommerceByTech(CommerceTypes eIndex, TechTypes eTech) determines if they have been researched or not and returns the commerce increase for each that has been researched. Each researched tech's commerce increase is then added up in updateTechCommerce() and then it checks to see if that value matches the one returned by getTechCommerce(CommerceTypes eIndex), which was the previous total commerce increase for all researched techs.
 
I edited the code just after I wrote it, maybe you copied it before I edited it.
(I added 'GET_PLAYER((PlayerTypes)iI).' before firstCity and nextCity)

Thanks, it appears I did. Compiles fine now!
 
Thanks, it appears I did. Compiles fine now!

Please look at my post right below the code Asaf posted. I had problems with crashing when I didn't initialize pCity to NULL and ensure it was valid in a similar function.
 
Please look at my post right below the code Asaf posted. I had problems with crashing when I didn't initialize pCity to NULL and ensure it was valid in a similar function.

These additions are required if the player has no cities, and I can think of several cases where this could happen.
 
So you're saying I need to change pLoopCity to something else?
 
Ah, I see what you were trying to say now.

On a totally off topic question, what can I change in CvGameCoreDLL.rc?
 
On a totally off topic question, what can I change in CvGameCoreDLL.rc?

Anything which appears in the version info of the DLL (in the explorer -> right click -> properties -> version tab).
 
With everyone's help, my mod is succesfully finished!

I wanted to thank Asaf, Phungus420, and everyone else who helped me stumble through this process. :king:

Btw, I uploaded my mod to the forums, and you can find it here.

Once again, :thanx::thanx::thanx:
 
Top Bottom