1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

So was Game.ChangePlayerEraScore function REMOVED?

Discussion in 'Civ6 - Creation & Customization' started by Windflier, Jun 29, 2020.

  1. Windflier

    Windflier Chieftain

    Joined:
    Dec 15, 2017
    Messages:
    38
    I was calling this function in my latest mod, but the lua log keep saying the line "Game.ChangePlayerEraScore(playerID, amount)" as "function expected instead of nil"
    I was playing on the GS ruleset, so it's no way I don't have the era score functions.
    So did this function get removed? if so, is there another function to adjust player's era score?
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,833
    Location:
    Illinois, USA
    I get the same error when I test for it, so apparently the function was removed from the "Game." methods.

    It may have been removed completely or it may have been moved to a "Player:" method. But Firaxis don't send us documentation on what was removed or moved so all you can do is try alternative methods something like
     
  3. Windflier

    Windflier Chieftain

    Joined:
    Dec 15, 2017
    Messages:
    38
    So, after looking into the FireTuner, I found out the function has been changing into Game.GetEras():ChangePlayerEraScore(playerID, amount)
    I don't know why they changed that, but fortunately we can found it out. The Lua Object table is outdated, hope someone can update it.
     
  4. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,609
    Gender:
    Male
    Location:
    Warsaw

Share This Page