Console error spam

Hello, this is a good concept but this throws a huge console error spam when a player swaps weapons.

 

 

[03.24 20:13:04] Failed to call hook 'OnPlayerAttack' on plugin 'ReviveArrows v3.0.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.ReviveArrows.OnPlayerAttack (BasePlayer player, HitInfo hitInfo) [0x0001d] in <1877feaa6e8042119c88445c80028fa8>:0

at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00154] in <1877feaa6e8042119c88445c80028fa8>:0

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

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

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.24 20:13:08] Failed to call hook 'OnPlayerAttack' on plugin 'ReviveArrows v3.0.0' (NullReferenceException: Object reference not set to an instance of an object)
[03.24 20:13:08] at Oxide.Plugins.ReviveArrows.OnPlayerAttack (BasePlayer player, HitInfo hitInfo) [0x0001d] in <1877feaa6e8042119c88445c80028fa8>:0
[03.24 20:13:08] at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00154] in <1877feaa6e8042119c88445c80028fa8>:0
[03.24 20:13:08] at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0
[03.24 20:13:08] at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.24 20:13:08] at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.24 20:14:31] Failed to call hook 'OnActiveItemChanged' on plugin 'ReviveArrows v3.0.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.ReviveArrows.OnActiveItemChanged (BasePlayer player, Item oldItem, Item newItem) [0x00017] in <1877feaa6e8042119c88445c80028fa8>:0

at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00116] in <1877feaa6e8042119c88445c80028fa8>:0

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

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

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.24 20:14:34] Failed to call hook 'OnActiveItemChanged' on plugin 'ReviveArrows v3.0.0' (NullReferenceException: Object reference not set to an instance of an object)
[03.24 20:14:34] at Oxide.Plugins.ReviveArrows.OnActiveItemChanged (BasePlayer player, Item oldItem, Item newItem) [0x00017] in <1877feaa6e8042119c88445c80028fa8>:0
[03.24 20:14:34] at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00116] in <1877feaa6e8042119c88445c80028fa8>:0
[03.24 20:14:34] at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0
[03.24 20:14:34] at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.24 20:14:34] at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0

 

I'll look into it

Merged post

Try the last version

Merged post

Also try to reset your lang file

Thank you very much :) I'll post the result after testing it.

Merged post

this is what I get when I just spawned with a bow on my hot bar and equipped it for a second

 

[03.25 03:32:13] Failed to call hook 'OnActiveItemChanged' on plugin 'ReviveArrows v3.0.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.ReviveArrows.OnActiveItemChanged (BasePlayer player, Item oldItem, Item newItem) [0x00017] in <65503fccae6d476091606f11cd6ab116>:0

at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00116] in <65503fccae6d476091606f11cd6ab116>:0

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

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

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.25 03:32:14] Saved 71,939 ents, cache(0.54), write(0.08), disk(0.02).
[03.25 03:32:14] Saving complete
[03.25 03:32:14] Failed to call hook 'OnActiveItemChanged' on plugin 'ReviveArrows v3.0.1' (NullReferenceException: Object reference not set to an instance of an object)
[03.25 03:32:14] at Oxide.Plugins.ReviveArrows.OnActiveItemChanged (BasePlayer player, Item oldItem, Item newItem) [0x00017] in <65503fccae6d476091606f11cd6ab116>:0
[03.25 03:32:14] at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00116] in <65503fccae6d476091606f11cd6ab116>:0
[03.25 03:32:14] at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0
[03.25 03:32:14] at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.25 03:32:14] at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0

 



Merged post

oh sorry, it's fixed. I forgot to delete the lang file. 

 



Merged post

sorry for spamming.  it happens again when I shoot NPC (without activating the ability) with a bow.

 

[03.25 04:10:23] Failed to call hook 'OnActiveItemChanged' on plugin 'ReviveArrows v3.0.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.ReviveArrows.OnActiveItemChanged (BasePlayer player, Item oldItem, Item newItem) [0x00017] in <bb536d3eb7be48eaa053c17753bbb586>:0

at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00116] in <bb536d3eb7be48eaa053c17753bbb586>:0

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

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

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.25 04:10:26] RuLey has spawned
[03.25 04:10:26] Failed to call hook 'OnActiveItemChanged' on plugin 'ReviveArrows v3.0.1' (NullReferenceException: Object reference not set to an instance of an object)
[03.25 04:10:26] at Oxide.Plugins.ReviveArrows.OnActiveItemChanged (BasePlayer player, Item oldItem, Item newItem) [0x00017] in <bb536d3eb7be48eaa053c17753bbb586>:0
[03.25 04:10:26] at Oxide.Plugins.ReviveArrows.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00116] in <bb536d3eb7be48eaa053c17753bbb586>:0
[03.25 04:10:26] at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0
[03.25 04:10:26] at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0
[03.25 04:10:26] at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <b6d06fce9e044af4a6ddc8d724bd3b0b>:0

Try the latest version

Thank you. I'll give it a try

Merged post

I can confirm this is fixed. 

testing in various scenarios, and no more spam. I will report back when I find a new bug.

Thank you :)