NullReferenceException at CanMoveItemFixed

J'ai actuellement le même soucis 

 

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

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

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

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <0f80813fd1a249f68cddebf75535c111>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <0f80813fd1a249f68cddebf75535c111>:0

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

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

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

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <0f80813fd1a249f68cddebf75535c111>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <0f80813fd1a249f68cddebf75535c111>:0

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

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

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

 

 

v0kcn2qiu1iSbdG.jpg pauseg
Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
19:58:15
Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
19:58:16
Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
19:58:17
Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <923e4c84630b42c4893427e4aeba462e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0


Merged post

this plugin is so good but i just restart my server and get this error, nothings helps ( deleting config, reload, i try everything. and it gets spamming in console, and stacks dont work 
VNEsOqzNZtOZ4Nu.jpg hackerochek

A temporary solution to the problem is the inclusion of this option, a recommendation not to increase the stack of weapons =)

StackSizeController.json

"DisableDupeFixAndLeaveWeaponMagsAlone": true,

I dont know where you get that from ?   it does nothing to stop you from stacking weapons in fact it allows  you to stack them but does not remove the mags

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x00019] in <111a391118f24d1badd3ca1d6d6e0bbb>:0
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <111a391118f24d1badd3ca1d6d6e0bbb>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0

Same issues and i am losing players due to this as it is making them rage quit!

Now on version V3.4.1 (6 days ago)

HfdkekXHQnJUIp0.jpg pookins

I dont know where you get that from ?   it does nothing to stop you from stacking weapons in fact it allows  you to stack them but does not remove the mags


Error in the function CanMoveItem, and the option "DisableDupeFixAndLeaveWeaponMagsAlone": true, does not give processing this function, it is clear from the debug in the console.
Waiting for the fix from the author, I unfortunately do not have time to look through the code to detect errors ((
9u01Y95Go1vQjOP.jpg hackerochek
Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in :0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in :0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in :0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0

I found that the error comes from this in the CanMoveItem method:
ItemContainer container = playerLoot.FindContainer (targetContainer) ?? null;
Solution to the problem:
Item targetItem = container? .GetSlot (targetSlot) ?? null;

But that doesn't fix the ammo disappearing issue

Before thankful for a plugin very show, despite the problems. On my server it expels the gun sights and gasoline from the miner hat, in addition to the red loop on the server. I had to go back to the version that is precarious but stable - v2.0.4.
Awaiting improvements for the upload in the current version.

i get this error and want to know what i can do to fix this ?
greets lemo
Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not s
et to an instance of an object)
at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer
, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <b8c4b5cb4a58494abc5f6acc9a9a67d9>:0
7kb/s in, 32kb/s out
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x
00e7e] in <b8c4b5cb4a58494abc5f6acc9a9a67d9>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <
31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca45
1cf5a1aa111c3>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5

Hello,
I have a little problem here and don't know what to do.
My plugins:
AutoDoors
Backpacks
BlueprintManager
GatherManager
NoDecay
QuickSmelt
RemoverTool
StackSizeController
TechTreeControl
TimeOfDay

[Error] Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <3dc5c4ea56d8457fa12bd2ae3ce36283>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <3dc5c4ea56d8457fa12bd2ae3ce36283>:0

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

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

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

Can someone help me

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <9b7575ae39c44096beea7f35c6ab003f>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <9b7575ae39c44096beea7f35c6ab003f>:0

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

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

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

alway show me in console, i dont know what to do, i was on your older version without problem but now is brand new change

I keep getting this error or one similar to it. 

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <f1edf60916664a59bf0652f9acfac12b>:0 
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <f1edf60916664a59bf0652f9acfac12b>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0​
I've also noticed that swapping a gun with attachments and ammo into the hotbar for another item causes the attachments and ammo to be unloaded, sometimes even dissappear.

I keep getting this error in the console all the time. Anybody knows why and how to fix it? It has some serious negative impact on the server, attachments and ammo disappear and sometime the weapons disappear as well...

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <2697fcfc9f1948ba94d3fa0e18b36d59>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <2697fcfc9f1948ba94d3fa0e18b36d59>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0
My Console Spam:

Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <99ef488a58f34032843fa2a25814b0cd>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <99ef488a58f34032843fa2a25814b0cd>:0

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

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

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

(22:33:05) | Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <99ef488a58f34032843fa2a25814b0cd>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <99ef488a58f34032843fa2a25814b0cd>:0

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

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

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



Same here

Same, just did a completely clean insteall on this plugin to double check

(17:15:18) | Unloaded plugin Stack Size Controller v3.4.0 by AnExiledGod

(17:15:19) | Loaded plugin Stack Size Controller v3.4.1 by AnExiledGod

(17:15:22) | Failed to call hook 'CanMoveItem' on plugin 'StackSizeController v3.4.1' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.StackSizeController.CanMoveItem (Item item, PlayerInventory playerLoot, System.UInt32 targetContainer, System.Int32 targetSlot, System.Int32 amount) [0x0001a] in <5738e9efc95548b8b85552944df65a6b>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7e] in <5738e9efc95548b8b85552944df65a6b>:0

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

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

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

Locked automatically