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; }
NullReferenceException in my code, need help
Discussion in 'Rust Development' started by Crushed, Dec 6, 2016.