KitsuneLab-Development / CS2-SteamRestrict

Enhance your game server's control with this plugin. Fetch and analyze player data from their Steam profiles, enforce minimum CS2 playtime and Steam level requirements, and customize restrictions for Prime and non-Prime players. Flexible and powerful server management tool.
GNU General Public License v3.0
37 stars 8 forks source link

[BUG] Steamworks GameServer is not initialized #15

Closed crashzk closed 5 months ago

crashzk commented 6 months ago

Receiving this error log:

2024-05-26 22:30:32.841 -03:00 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: Steamworks GameServer is not initialized.
   at Steamworks.InteropHelp.TestIfAvailableGameServer()
   at KitsuneSteamRestrict.SteamRestrictPlugin.CheckUserViolations(IntPtr handle, UInt64 authorizedSteamID)
   at InvokeStub_Action.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   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
K4ryuu commented 5 months ago

The issue has been solved by removing Steamworks completely from the project and using own solution for checking games. The update is going to be pushed with some other changes shortly.