Stops working when new skin is added

everytime I add a new skin to the list now I need to reload the plugin to be able to use it. any one have a idea why that could be?

see command (purge cache part)

Failed to call hook 'OnItemAddedToContainer' on plugin 'Skins v2.2.2' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.Skins+ContainerController.DrawUI (System.Int32 page) [0x0003f] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.Skins+ContainerController.UpdateContent (System.Int32 page) [0x00205] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.Skins.OnItemAddedToContainer (ItemContainer itemContainer, Item item) [0x000a2] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.Skins.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002f3] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <9882f28dc2204b4dba514a9ad18f5042>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <9882f28dc2204b4dba514a9ad18f5042>:0
Failed to call hook 'OnItemAddedToContainer' on plugin 'Skins v2.2.2' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.Skins+ContainerController.DrawUI (System.Int32 page) [0x0003f] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.Skins+ContainerController.UpdateContent (System.Int32 page) [0x00205] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.Skins.OnItemAddedToContainer (ItemContainer itemContainer, Item item) [0x000a2] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.Skins.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002f3] in <968443172c1847558ad60066418217b2>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <9882f28dc2204b4dba514a9ad18f5042>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <9882f28dc2204b4dba514a9ad18f5042>:0


Merged post

The purge did not work, But I seen this error upon adding a skin and making the plugin fail for me. 

Do I need to write it out differantly? is it somthing I did?

I can confirm that purging the cache does not work for this specific error.

The above error will continue to persist each time the "/skin" command is used and you put an item in the slot to try and skin it. When this happens no skins will appear at all, it is like the plugin was newly installed with no Skins.json file in the data folder. The only fix for this error right now is for an admin with server console access to unload and then load the Skins plugin again, only then the "/skin" command will start working again and available skins will appear. Until the next time the "/skin add" command is used to add a skin, then the plugin will break again.

We are also having this issue on my server. Only admins have the permission setup to add/remove the skins. Every time we make changes I have to use the oxide.reload Skins command in console to get the skins to show in the lootbox again

 

yes skins at leat starts on its own now but is as patrice said.

Hey Misticos, fix your plugin. This error has nothing to do with the cache - why does it keep turning off for all players when adding or removing a skin? That did not happen in the previous version. Regular players cannot reload the plugin, and when you look to see, the skin you added or removed did not get added. The purge command you referenced doesn't affect this issue. Please look into it thank you!

well, "stops working" and having an error is different. if it does not show the new skin, the command fixes it. if it throws the error, it is a different problem indeed

Appreciate you <3

Qble9YPyseIOkyH.png misticos

well, "stops working" and having an error is different. if it does not show the new skin, the command fixes it. if it throws the error, it is a different problem indeed

 

To be clear, the issue is when we use the /skin add or /skin remove commands, it does add/remove the skin id as expected, but then afterwards the /skin command shows an empty loot/selection box. We have to use oxide.reload Skins in console to get the skins to show again with /skin command. Something is broken in the background each time we add/remove ID's

So what happens is.. When a new (valid) skin# is added in game via the chat console, the plugin crashes.  You can still open the "skins" box however it won't display any additional skins for your item.  If you check the console, it will show you the error i'm posting below.
If you then do "o.reload Skins" then the plugin will reload fine, the new skin just added will be there, and the plugin will work just fine, until another new skin is added via the chat console.  I hope this helps to better explain the issue..
Thanks
Error:

[event] assets/prefabs/npc/cargo plane/cargo_plane.prefab
Failed to call hook 'OnItemAddedToContainer' on plugin 'Skins v2.2.2' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.Skins+ContainerController.DrawUI (System.Int32 page) [0x0003f] in <6ac211a54f4d4bdfb3b96e58750e145b>:0
67,305 ents, 1 slprs 3kb/s in, 36kb/s out
at Oxide.Plugins.Skins+ContainerController.UpdateContent (System.Int32 page) [0x00205] in <6ac211a54f4d4bdfb3b96e58750e145b>:0
at Oxide.Plugins.Skins.OnItemAddedToContainer (ItemContainer itemContainer, Item item) [0x000a2] in <6ac211a54f4d4bdfb3b96e58750e145b>:0
at Oxide.Plugins.Skins.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002f3] in <6ac211a54f4d4bdfb3b96e58750e145b>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <dfcb48ea05694263bbc08e62a39c274c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <dfcb48ea05694263bbc08e62a39c274c>:0
> o.reload Skins

Thanks for the updates team - I would love a copy of the forked version if it was made available.

Still broken lol gosh what a world we live in