TechAcquired event crashes scenarios

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
  1. Create a scenario map.
  2. Create a lua mod which prints the names of players who acquire technologies:
    PHP:
    function NewTech(playerID, techID)    
        local player = Players[playerID]
        print(tostring(playerID) .. " " .. tostring(techID))
        print(tostring(player))
        print(tostring(player.GetName))
        print(tostring(player:GetName()))
    end
    Events.TechAcquired.Add(NewTech)
  3. Enable the mod.
  4. Start the scenario.
  5. When a citystate acquires a technology, the game crashes:
    Code:
    8 1
    table: 136B7B18
    function: 135F82B0
    Napoleon
    
    9 1
    table: 136B7BB8
    function: 135F82B0
    (crash to desktop)
 
Back
Top Bottom