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

Overwritten ResourceBuilder.CanHaveResource

Discussion in 'Bug reports' started by Infixo, Mar 22, 2018.

  1. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,469
    Gender:
    Male
    Location:
    Warsaw
    YnAMP overwrites ResourceBuilder.CanHaveResource but once it's finished working, it doesn't restore the original function. Any other mod that calls later ResourceBuilder.CanHaveResource gets an error because in a different context the function IsResourceExclusion is not defined.

    Runtime Error: C:\Games\Steam\steamapps\workshop\content\289070\871861883\Override\AssignStartingPlots.lua:3566: function expected instead of nil

    Please implement one of the following:
    a) restore the original function
    b) reverse the last parameter check, so when anyone calls it with 2 default parameters, the 3 will default to nil i.e. false and the routine can then call original function.

    Thx!
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,130
    Location:
    France
    Thanks for the report (and sorry for the trouble), I've pushed something on github, I hope it fixes this.
     
  3. Infixo

    Infixo Deity

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

Share This Page