roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
742 stars 111 forks source link

map change html menu error #382

Open maxgamingir opened 5 months ago

maxgamingir commented 5 months ago

on map change if html menu is open :

01:12:12 [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Entity is not valid at CounterStrikeSharp.API.Guard.IsValidEntity(CEntityInstance ent) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Guard.cs:line 8 at CounterStrikeSharp.API.Core.CCSPlayerController.PrintToCenterHtml(String message, Int32 duration) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Model/CCSPlayerController.cs:line 78 at CounterStrikeSharp.API.Modules.Menu.CenterHtmlMenuInstance.Reset() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Menu/CenterHtmlMenu.cs:line 117 at CounterStrikeSharp.API.Modules.Menu.CenterHtmlMenuInstance.Display() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Menu/CenterHtmlMenu.cs:line 72 at InvokeStub_OnTick.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.BasePlugin.<>c__DisplayClass51_01.<RegisterListener>b__2(ScriptContext context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/BasePlugin.cs:line 276 at InvokeStub_Action1.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.b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 120