CS-GEJMERZY / VIP-Plugin

VIP plugin designed to work with CSS framework on cs2 servers.
GNU General Public License v3.0
13 stars 3 forks source link

Error css_vip #62

Open gha241 opened 2 months ago

gha241 commented 2 months ago

14:49:56 [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 Core.Plugin.OnPlayerVIPInfoCommand(CCSPlayerController player, CommandInfo commandInfo) in /home/runner/work/VIP-Plugin/VIP-Plugin/src/Commands/AdminCommands.cs:line 360 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 159 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void* arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr) 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

wohahobg commented 2 months ago

Hey thanks I will fix this. The command is to be run only in-game.

gha241 commented 2 months ago

Hey thanks I will fix this. The command is to be run only in-game.

I have myself VIP on the server and after entering !vip or !css_vip the information is displayed that I do not have any service :)

wohahobg commented 2 months ago

Is the vip by Random VIp or Night Vip or by flag?

I have test it only via group id.

gha241 commented 2 months ago

Czy VIP jest przyznawany Random VIP, Night VIP czy flagą?

Testowałem to tylko przez identyfikator grupy.

Vip is on the flag

wohahobg commented 2 months ago

I see where the issue is. !vip work only if the record exists in the database.

So you have to add it by the command.

I will try to find away around this in my off time.