why am I getting this?
Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.GatherRewards+<>c__DisplayClass19_0.b__0 () [0x00050] in <7801b622b48e4627a2b153e896a8b566>:0 at Oxide.Core.OxideMod.OnFrame (System.Single delta) [0x00051] in <8cb2d664f1574f2b96d53f1c1869d96a>:0
Gather Rewards
+1 same issue
+1 same issue for a long time
This is carbon issue too
Failed to execute OnFrame callback (Object reference not set to an instance of an object)
at void Oxide.Plugins.GatherRewards.OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)+() => { } in /home/container/carbon/plugins/GatherRewards.cs:line 261
at void Carbon.Managers.CarbonProcessor.Update() in /home/runner/work/Carbon/Carbon/Carbon.Core/Carbon/src/Processors/CarbonProcessor.cs:line 63
It seems like this fix in the plugin helped me:
if (_config.Settings.AwardOnlyOnFullHarvest)
{
var ent = dispenser.GetComponent<BaseEntity>();
var gatherType = dispenser.gatherType;
var fractionRemaining = dispenser.fractionRemaining;
var itemShortname = item.info.shortname;
var finalAmount = amount;
NextTick(() =>
{
if (player == null || !player.IsConnected) return;
if (gatherType == ResourceDispenser.GatherType.Tree && fractionRemaining <= 0)
{
GiveCredit(player, "gather", finalAmount, "Tree");
return;
}
if (ent != null && !ent.IsDestroyed)
{
return;
}
GiveCredit(player, "gather", finalAmount, itemShortname);
});
}
else
{
GiveCredit(player, "gather", amount, _resource);
}
}1. open the Gather Rewards.cs file in VS Code or Notepad++.
2. find the condition: if (_config.Settings.AwardOnlyOnFullHarvest)
(for me, it's line 244)
3. replace the entire condition
(lines 244 through 271)
ps: all actions are at your own risk)
img fix:
https://thumbsnap.com/g2bLfKYt