[ConsoleCommand("stats.reset")]
private void ResetStatsCmd(ConsoleSystem.Arg arg)
{
if (!arg.IsRcon) return;
GetAllPlayers().ForEach(ID => PVEStatsData.Reset(ID));
PrintWarning(string.Format(msg("ResetStats"), new object[] { GetAllPlayers().Count }));
}I have this console command that wipes stats. When i run it in console i get these errors and im not sure why. Plz help.
Failed to call hook 'ResetStatsCmd' on plugin 'NPCKillCounter v1.0.0' (KeyNotFoundException: The given key was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.NPCKillCounter+PVEStatsData.Reset (System.UInt64 id) [0x00034] in <80ffc568a10b458fb027fc939681360a>:0
at Oxide.Plugins.NPCKillCounter.<ResetStatsCmd>m__0 (System.UInt64 ID) [0x00000] in <80ffc568a10b458fb027fc939681360a>:0
at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.NPCKillCounter.ResetStatsCmd (ConsoleSystem+Arg arg) [0x00012] in <80ffc568a10b458fb027fc939681360a>:0
at Oxide.Plugins.NPCKillCounter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001f8] in <80ffc568a10b458fb027fc939681360a>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0