partiusfabaa / cs2-VIPCore

46 stars 18 forks source link

VIP_Random Module #47

Closed T3Marius closed 2 months ago

T3Marius commented 2 months ago

Hi @partiusfabaa , i made a random vip module that gives a player a vip group from vip.json for the map or until he disconnects. the config is created in VIPCore/modules/vip_random.json

wohahobg commented 2 months ago

Hello @T3Marius the module is giving this error 16:47:28 [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 VIP_Random.VIP_Random.OnRoundStart(EventRoundStart event, GameEventInfo info) in C:\Users\Marius\Downloads\dRandomVIP-main\dRandomVIP-main[ D3X ] Random VIP - SRC Files\VIP_Random.cs:line 75 at InvokeStub_GameEventHandler1.Invoke(Object, Span1) at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) --- End of inner exception stack trace --- at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at CounterStrikeSharp.API.Core.FunctionReference.b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100 103.343750 Long frame (FreezePeriod): 20.43ms elapsed, 20.23ms sim time, 1 ticks, 6614..6614. 'Wohaho': CQ resync (catchup), client will discard cmd timing < 2185

T3Marius commented 2 months ago

Hello @T3Marius the module is giving this error 16:47:28 [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 VIP_Random.VIP_Random.OnRoundStart(EventRoundStart event, GameEventInfo info) in C:\Users\Marius\Downloads\dRandomVIP-main\dRandomVIP-main[ D3X ] Random VIP - SRC Files\VIP_Random.cs:line 75 at InvokeStub_GameEventHandler1.Invoke(Object, Span1) at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) --- End of inner exception stack trace --- at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at CounterStrikeSharp.API.Core.FunctionReference.b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100 103.343750 Long frame (FreezePeriod): 20.43ms elapsed, 20.23ms sim time, 1 ticks, 6614..6614. 'Wohaho': CQ resync (catchup), client will discard cmd timing < 2185

Check css discord, i will put there an update