phara1 / advanced-ff-cs2

Advanced Friendly Fire - CS2
GNU General Public License v3.0
11 stars 0 forks source link

[BUG] [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException #8

Open crashzk opened 1 month ago

crashzk commented 1 month ago

Receiving the following error log:

2024-10-19 20:57:05.609 -03:00 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at AdvancedFriendlyFire.AdvancedFriendlyFire.OnAdvancedFriendlyFireHook(DynamicHook hook) in S:\ROGLX NETWORK\server\scripts_tomade\Advanced Friendly Fire\advanced_friendlyfire.cs:line 151
   at InvokeStub_Func`2.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100
2024-10-19 20:57:05.810 -03:00 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at AdvancedFriendlyFire.AdvancedFriendlyFire.OnAdvancedFriendlyFireHook(DynamicHook hook) in S:\ROGLX NETWORK\server\scripts_tomade\Advanced Friendly Fire\advanced_friendlyfire.cs:line 151
   at InvokeStub_Func`2.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100
2024-10-19 20:57:05.997 -03:00 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at AdvancedFriendlyFire.AdvancedFriendlyFire.OnAdvancedFriendlyFireHook(DynamicHook hook) in S:\ROGLX NETWORK\server\scripts_tomade\Advanced Friendly Fire\advanced_friendlyfire.cs:line 151
   at InvokeStub_Func`2.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100
phara1 commented 2 weeks ago

This should be fixed too in 1.1.3 https://github.com/phara1/advanced-ff-cs2/releases/tag/v1.1.3 Let me know if you still encounter it