Machiavelli24
Mod creator
- Joined
- May 9, 2012
- Messages
- 818
It looks like that whole line is not suppose to be there. CityID is nil but its result is never used so it doesn't cause a problem.#1) which Machiavelli mod? can't really answer #1 without knowing what the rest of the file looks like. Likely he has predefined cityID elsewhere than within that function as a global.
---------------
I don't know of a way to detect when a resource is connected or disconnected, you'll have to poll each turn (meaning use PlayerDoTurn to check each turn).
Ulixes, can you specify what effect you're trying to implement? If I understand it correctly you want the following:
When a player has a specific resource every city that is connected to their capital should be given a free building (that can not normally be built).
In some of the more recent code I'm not sure what the purpose of "numCottonBuildings" or "numSilkBuildings" is suppose to serve.