NullReferenceException at ItemSpawnerFixed
I run Botspawn and I am getting this a bit:

(20:17:18) | Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.3.2' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x00091] in <96419514e8e0447dbc220eda352b23d8>:0

at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x00048] in <96419514e8e0447dbc220eda352b23d8>:0

at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00192] in <96419514e8e0447dbc220eda352b23d8>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

do I need to turn off wipe belt?
In response to MalS ():
I run Botspawn and I am getting this a bit:
(20:17:18) | Failed to call hook 'OnEntityDeath'...
Never tested this with botspawn, do you have "remove default loot" config setting on?
I will look into this issue when I get some time, pretty busy right now, sorry.
no worries, no rush.

{
  "1 | Chance to drop gun:": 1.0,
  "1 | Drop guns:": true,
  "1 | Max weapon condition:": 150.0,
  "1 | Min weapon condition:": 20.0,
  "2 | Chance to drop ammo:": 1.0,
  "2 | Drop ammo:": false,
  "2 | Max ammo count:": 0,
  "2 | Min ammo count:": 0,
  "3 | Chance to drop meds:": 1.0,
  "3 | Drop meds:": false,
  "3 | Max med syringes:": 0,
  "3 | Min med syringes:": 0,
  "4 | Remove default loot:": false
}​
i get the following error after every restart....

(06:24:17) | Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.3.3' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x000a2] in <84c9cb3a2cbf4f51ab295bc6fd39f8cc>:0

at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x00048] in <84c9cb3a2cbf4f51ab295bc6fd39f8cc>:0

at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00247] in <84c9cb3a2cbf4f51ab295bc6fd39f8cc>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

I'm getting the same error I think

Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.3.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x0012c] in <bf2ba57cd3e74e9698f75eee2edd473e>:0 
  at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x0007c] in <bf2ba57cd3e74e9698f75eee2edd473e>:0 
  at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00192] in <bf2ba57cd3e74e9698f75eee2edd473e>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

It happens a lot for me. Not just on restart but throughout the uptime of the server. I'm using BotSpawn as well. If setting "Wipe_Belt": false, is the fix for it, that would mean reworking all the kits and limiting the perfomance of the plugin(BotSpawn). If you need a setup for the bots and kits I can upload my configs and you can test out what I've got so you don't have to go through the hassle of creating everything.

Im probably just not going to use it anymore if it ends up starting to interfere with anything. So far its just a annoying error in the rcon.
Check now, should be fixed (never tested cuz I have no time, sry)
Thank you for the update. But I'm still getting the error 
| Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.4.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x0016c] in <3ae940318c984de19eb072ea457ec0f7>:0 
  at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x0007c] in <3ae940318c984de19eb072ea457ec0f7>:0 
  at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001db] in <3ae940318c984de19eb072ea457ec0f7>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0​

I have recently noticed quite a few errors in my logs from this plugin. The only values that are different from the config example is the drop rates. 

[Error] Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.4.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x0016c] in <6bdd8cdfb2b3453a82e7c90773f202a9>:0

at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x0007c] in <6bdd8cdfb2b3453a82e7c90773f202a9>:0

at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001db] in <6bdd8cdfb2b3453a82e7c90773f202a9>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

I get this error pretty regularly now and was wondering if this is happening to anyone else?

(18:40:00) | Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.4.0' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x0016c] in <759605753b65480e95627ee88be11cc5>:0

at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x0007c] in <759605753b65480e95627ee88be11cc5>:0

at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001db] in <759605753b65480e95627ee88be11cc5>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

In response to JawsChannelTv ():
(18:40:00) | Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.4.0' (NullReferenceExcept...
Do u use botspawn plugin as well?
In response to 2CHEVSKII ():
Do u use botspawn plugin as well?
Yes I do, I run a PVE server.
Been noticing this error appearing more and more. It pops up a few times a minute sometimes. Any help would be greatly appreciated.


03:18 [Error] Failed to call hook 'OnEntityDeath' on plugin 'NPCDropGun v1.4.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.NPCDropGun.ItemSpawner (BaseEntity heldEntity, UnityEngine.Vector3 dropPosition) [0x0016c] in <cd4479e8a4104852a496fbf31f2a8c77>:0

at Oxide.Plugins.NPCDropGun.OnEntityDeath (BaseCombatEntity entity, HitInfo info) [0x0007c] in <cd4479e8a4104852a496fbf31f2a8c77>:0

at Oxide.Plugins.NPCDropGun.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001db] in <cd4479e8a4104852a496fbf31f2a8c77>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
Use the updated version, fixed now =)
In response to 2CHEVSKII ():
Use the updated version, fixed now =)
Thanks brother. Much love!
Locked automatically