modifieda4,
I really respect your kind efforts to help sove this problem and think you deserve to see my detailed test results using your code: So here it goes:
Scenario: There are only 3 players: 1 human and 2 AI.
1. Turn 39: AI civ (Egypt) discovers Meditation and founds Buddism.
2. Turn 215: Human player discovers Meditation and no religion is founded.
3. Turn 222: Verified Egypt has previously discovered Polytheism
4. Turn 223: Human player discovers Polytheism and Hinduism religion is founded automatically. No popup window came up to select the religion even though the game option to "Choose Religions" was selected.
5. Turn 223: The second AI civ never discovered a religion.
End of Test
This was far enough to convince me the code is not working correctly in at least two areas and needs a little improvement. Don't read me wrong here, as I really appreciate your efforts to fix this tricky code and I am very thankful for your help.
This weekend, I will return to my 101C code and see if I can find a way to stop the AI from discovering more than one religion.
V/R,
Orion Veteran