Thalassicus
Bytes and Nibblers
What's a reliable way to detect new techs?
I tried TechAcquired, but calling functions within that event crashes scenario maps when it reaches citystates. I can't figure out a way to omit citystates without calling a function.
I tried TechAcquired, but calling functions within that event crashes scenario maps when it reaches citystates. I can't figure out a way to omit citystates without calling a function.

PHP:
function NewTech(playerID, techID)
local player = Players[playerID]
print(tostring(playerID) .. " " .. tostring(techID))
print(tostring(player.GetName))
print(tostring(player:GetName()))
end
Events.TechAcquired.Add(NewTech)
Code:
8 1
function: 135F82B0
Napoleon
9 1
function: 135F82B0
(crash)