jpw1991 / chebs-mercenaries

Cheb's Mercenaries adds mercenaries to Valheim that you can purchase with gold and upgrade with materials to fight (warriors, archers) or perform work (lumberjacks, miners).
The Unlicense
3 stars 3 forks source link

null object updating chest recipe #31

Open jpw1991 opened 1 year ago

jpw1991 commented 1 year ago
[Error  :ChebsMercenaries] There was an issue loading your com.chebgonaz.chebsmercenaries.cfg: System.NullReferenceException: Object reference not set to an instance of an object
  at ChebsValheimLibrary.Common.ChebsRecipe.UpdateRecipe (BepInEx.Configuration.ConfigEntry`1[T] craftingCost) [0x0008c] in <44a3e49bab1d440085ca07afd5e56bdf>:0
  at ChebsMercenaries.Structure.MercenaryChest.UpdateRecipe () [0x0000f] in <06042440c4154aaf960862e81793ced8>:0
  at ChebsMercenaries.BasePlugin.ReadConfigValues (System.Object sender, System.IO.FileSystemEventArgs e) [0x00033] in <06042440c4154aaf960862e81793ced8>:0
[Error  :ChebsMercenaries] Please check your config entries for spelling and format!

Investigate cause of above null object. Possible lead:

        public new static void UpdateRecipe()
        {
            ChebsRecipeConfig.UpdateRecipe(ChebsRecipeConfig.CraftingCost);
        }

I dont know why I use new here. Should probably be an override and also call the super's stuff. I don't know - need to sit down and think about this