abnerfs/cs2-rockthevote

Error invoking callback when typing timeleft from server console

BoTo-sg opened this issue · 2 comments

timeleft
00:29:21 [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 cs2_rockthevote.TimeLeftCommand.CommandHandler(CCSPlayerController player) in /home/runner/work/cs2-rockthevote/cs2-rockthevote/Features/TimeLeftCommand.cs:line 86
at cs2_rockthevote.Plugin.OnTimeLeft(CCSPlayerController player, CommandInfo command) in /home/runner/work/cs2-rockthevote/cs2-rockthevote/Features/TimeLeftCommand.cs:line 15
at CounterStrikeSharp.API.Core.Commands.CommandManager.HandleCommandInternal(Int32 playerSlot, IntPtr commandInfo) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Commands/CommandManager.cs:line 162
at InvokeStub_Action`2.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__DisplayClass7_0.<.ctor>b__0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 106
Time Remaining: 0:33

Commands are not ready to be invoked from server's console, I will handle it