Cybah
Emperor
- Joined
- Jun 22, 2007
- Messages
- 1,481
Code:
iCunResearchTech = pPlayer.getCurrentResearch()
[B]if iCunResearchTech[/B]:
lDiscovered****echStrs = gc.getTechInfo(iCunResearchTech).getDescription()
the bold does not seem to have any effect. I get a NoneType error for the next getDescription line if there is no current research (no current research can happen when running AI Autoplay or when no city is founded = at starting round).
The code stores the description (e.g. "Fishing") of the current research if there is a current research. the code should stop if there is no current research. "if iCunResearchTech" does not work to get rid of the NoneType error.
My English is not that good, I hope you understand what I want.
Error message: