KitsuneLab-Development / CS2_DamageInfo

CS2 server extension that displays the amount of damage players have inflicted on the victim's HP and Armor, as well as the hit groups they have hit.
GNU General Public License v3.0
64 stars 8 forks source link

[BUG] #5

Closed daffyyyy closed 1 year ago

daffyyyy commented 1 year ago

Describe the bug On csharp v30 and server with bots dealing dmg cause error

Logs (Optional)

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '5' was not present in the dictionary.
   at K4ryuuDamageInfo.DamageData.UpdateDamage(CCSPlayerController attackerController, Int32 targetId, Int32 damageHP, Int32 damageArmor, Int32 Hitgroup) in /var/lib/pterodactyl/volumes/6ef877cd-d1a3-4412-8704-745b1ab7973a/game/csgo/addons/counterstrikesharp/source/CS2_DamageInfo-1.3.0/K4ryuuDamageInfo.cs:line 150
   at K4ryuuDamageInfo.DamageInfoPlugin.<Load>b__8_0(EventPlayerHurt event, GameEventInfo info) in /var/lib/pterodactyl/volumes/6ef877cd-d1a3-4412-8704-745b1ab7973a/game/csgo/addons/counterstrikesharp/source/CS2_DamageInfo-1.3.0/K4ryuuDamageInfo.cs:line 61
   at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '4' was not present in the dictionary.
   at K4ryuuDamageInfo.DamageData.UpdateDamage(CCSPlayerController attackerController, Int32 targetId, Int32 damageHP, Int32 damageArmor, Int32 Hitgroup) in /var/lib/pterodactyl/volumes/6ef877cd-d1a3-4412-8704-745b1ab7973a/game/csgo/addons/counterstrikesharp/source/CS2_DamageInfo-1.3.0/K4ryuuDamageInfo.cs:line 150
   at K4ryuuDamageInfo.DamageInfoPlugin.<Load>b__8_0(EventPlayerHurt event, GameEventInfo info) in /var/lib/pterodactyl/volumes/6ef877cd-d1a3-4412-8704-745b1ab7973a/game/csgo/addons/counterstrikesharp/source/CS2_DamageInfo-1.3.0/K4ryuuDamageInfo.cs:line 61
   at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /__w/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 81
K4ryuu commented 1 year ago

Hello, Are you using Advertisements plugin?

daffyyyy commented 1 year ago

Yes

K4ryuu commented 1 year ago

The two plugin are incompatible. If they both prints to the center box, the server crashes.

daffyyyy commented 1 year ago

@K4ryuu Okay, but without advertisement plugin same error :D

K4ryuu commented 1 year ago

This problem is the same with every plugin using Center messages, since only one plugin can handle them at the moment without crashes at a time.

daffyyyy commented 1 year ago

Its error, no crash 😅 Only damageinfo show center message for my server

K4ryuu commented 1 year ago

Going to patch the plugin this night hopefully with the new API solutions. I missunderstood your problem, sorry.

K4ryuu commented 1 year ago

Greetings, The latest release (v1.3.1) possibly fixed your problems.

Best Regards, K4ryuu