
All i did was oxide.reload *
And it happens even when I just do oxide.reload Vanish... Stopped server to fix it.

All i did was oxide.reload *
And it happens even when I just do oxide.reload Vanish... Stopped server to fix it.
i get this message on server restart, just wanted to let you know.
Failed to call hook 'Unload' on plugin 'Vanish v1.3.1' (InvalidOperationException: Collection was modified; enumeration operation may not execute.)
at System.ThrowHelper.ThrowInvalidOperationException (System.ExceptionResource resource) [0x0000b] in <437ba245d8404784b9fbab9b439ac908>:0
at System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () [0x00013] in <437ba245d8404784b9fbab9b439ac908>:0
at System.Collections.Generic.List`1+Enumerator[T].MoveNext () [0x0004a] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.Vanish.Unload () [0x00031] in :0
at Oxide.Plugins.Vanish.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000d5] 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 Looks like you are trying to modify the list of hidden players while within the foreach enumeration of said list, resulting in the EDIT: IOE - InvalidOperationException (not an NRE as posted in title).
Maybe add ".ToArray()" so we loop over a collection that does not get modified during the loop?
private void Unload()
{
foreach (var player in _hiddenPlayers.ToArray())
{
if (player == null) continue;
Reappear(player);
}
_hiddenPlayers.Clear();
} PureForce
Looks like you are trying to modify the list of hidden players while within the foreach enumeration of said list, resulting in the EDIT: IOE - InvalidOperationException (not an NRE as posted in title).
Maybe add ".ToArray()" so we loop over a collection that does not get modified during the loop?private void Unload() { foreach (var player in _hiddenPlayers.ToArray()) { if (player == null) continue; Reappear(player); } _hiddenPlayers.Clear(); }
Thanks ill push this in the next update