1. Need some help cause plugin is spamming ex. in the console-

    Code:
    (23:34:53) | [Oxide] 23:34 [Error] Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)
    (23:34:53) | [Oxide] 23:34 [Debug]   at Oxide.Plugins.HuntPlugin+<OnStructureUpgrade>c__AnonStorey1.<>m__0 () [0x00000] in <filename unknown>:0
      at Oxide.Core.OxideMod.OnFrame (Single delta) [0x00000] in <filename unknown>:0

    Heres the Code Strip.
    Code:
    object OnStructureUpgrade(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum grade)
            {
                NextTick(() =>
                {
                    if (buildingBlock.grade != grade) return true;
                    var items = buildingBlock.blockDefinition.grades[(int) grade].costToBuild;
                    var total = 0;
                    foreach (var item in items)
                        total += (int) item.amount;
                    var experience = (int) Math.Ceiling(UpgradeBuildingTable[grade]*total);
                    ExpGain(FindRpgInfo(player), experience, player);
                });
                return null;
            }
     
  2. Wulf

    Wulf Community Admin

    One of the items you are calling is null, so you'd need to add checks to see. The NextTick isn't actually the issue. It'd either be the item, block, grade, or player that is null most likely.