Rnen / AdminToolbox

A SMod2 Server Administration Toolbox Plugin for SCP: Secret Lab
Creative Commons Attribution Share Alike 4.0 International
16 stars 10 forks source link

Player Hurt Event #106

Closed 0-x-P closed 4 years ago

0-x-P commented 4 years ago

When someone has their HP taken away by some form of attack enforced on them or something, it will give this error

_- [23:11:48] [ERROR] [Event] Event Handler: AdminToolbox.DamageDetect Failed to handle event:Smod2.Events.PlayerHurtEvent [23:11:48] [ERROR] [Event] System.InvalidCastException: Specified cast is not valid. at System.Linq.Enumerable+d_341[TResult].MoveNext () [0x00040] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Collections.Generic.LargeArrayBuilder1[T].AddRange (System.Collections.Generic.IEnumerable1[T] items) [0x0005e] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable1[T] source) [0x00033] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at AdminToolbox.API.Utility.TryParseRole (System.Int32 roleID, Smod2.API.RoleType& role) [0x00017] in <0dc84229e21e4c85bd2d313e150dfbdc>:0 at AdminToolbox.DamageDetect.OnPlayerHurt (Smod2.Events.PlayerHurtEvent ev) [0x00277] in <0dc84229e21e4c85bd2d313e150dfbdc>:0 at Smod2.Events.PlayerHurtEvent.ExecuteHandler (Smod2.EventHandlers.IEventHandler handler) [0x00000] in :0 at Smod2.Events.EventManager.HandleEvent[T] (Smod2.Events.Event ev) [0x00016] in :0

Rnen commented 4 years ago

Unless you specify SMod & plugin version, theres not much i can do. :pensive: