KarlOfDuty / SCPDiscord

A Northwood plugin which adds remote interaction to an SCP:SL server through Discord.
https://karlofduty.com
GNU General Public License v3.0
12 stars 13 forks source link

Playtime Tracker Exception #168

Closed xNexusACS closed 1 month ago

xNexusACS commented 1 month ago
[2024-06-17 19:25:14.842 +00:00] [Error] [PluginAPI] Failed executing event OnPlayerLeave (PlayerLeft) in plugin SCPDiscord.SCPDiscord
                                 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
                                 Parameter name: key
                                   at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <05089c1b6989455fb1452c627044bac4>:0 
                                   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValuevalue) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0 
                                   at SCPDiscord.PlayTime.OnPlayerLeave (System.String userID) [0x00001] in <163c44e4212049598db90eac811fa7d6>:0 
                                   at SCPDiscord.TimeTrackingListener.OnPlayerLeave (PluginAPI.Events.PlayerLeftEvent ev) [0x00029] in <163c44e4212049598db90eac811fa7d6>:0 
                                   at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception
                                   at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <05089c1b6989455fb1452c627044bac4>:0 
                                    --- End of inner exception stack trace ---
                                   at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <05089c1b6989455fb1452c627044bac4>:0 
                                   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <05089c1b6989455fb1452c627044bac4>:0 
                                   at PluginAPI.Events.EventManager.ExecuteEvent[T] (PluginAPI.Events.IEventArguments args) [0x0018b] in <20cb197b905e4ac59c25edf6bca5f96b>:0
KarlOfDuty commented 1 month ago

Does this happen a lot? Is it always to the same players?

xNexusACS commented 1 month ago

Does this happen a lot? Is it always to the same players?

sometimes only, and no, it happen to diff players.

KarlOfDuty commented 1 month ago

I see what the issue is, I'll fix it in a bit.

KarlOfDuty commented 1 month ago

You can try the latest dev build, should be fixed now.