daffyyyy / CS2-SimpleAdmin

Manage your Counter-Strike 2 server by simple commands :)
GNU General Public License v3.0
104 stars 33 forks source link

Database & admin rights problem #7

Closed asapverneri closed 9 months ago

asapverneri commented 9 months ago

Hello,

I've installed this plugin corrently & added database info, but i'm getting error showing below: I've tried different cssharp versions, but it didn't help.

03:23:51 [EROR] (cssharp:PluginManager) Failed to load plugin from D:\server\cs2publa\game\csgo\addons\counterstrikesharp\plugins\CS2-SimpleAdmin\CS2-SimpleAdmin.dll
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Exception: [CS2-SimpleAdmin] Unable to connect to Database!Invalid default value for 'created'
   at CS2_SimpleAdmin.CS2_SimpleAdmin.OnConfigParsed(CS2_SimpleAdminConfig config) in /home/runner/work/CS2-SimpleAdmin/CS2-SimpleAdmin/CS2-SimpleAdmin.cs:line 104
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   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.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at CounterStrikeSharp.API.Core.BasePlugin.InitializeConfig(Object instance, Type pluginType) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/BasePlugin.cs:line 379
   at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 190
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 52
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 34
asapverneri commented 9 months ago

EDIT: I got database working. I edited mysql sql_mode and it worked.

Now i have another issue where it says that i don't have admin rights, even though i've added myself as an admin. I'm currently running latest cssharp (v112). My admins.json looks like below:

{
  "yay": {
    "identity": "STEAM_0:0:XXXXXXXX",
    "immunity": 100,
    "flags": [
      "@css/reservation",
      "@css/generic",
      "@css/kick",
      "@css/ban",
      "@css/unban",
      "@css/vip",
      "@css/slay",
      "@css/changemap",
      "@css/cvar",
      "@css/config",
      "@css/chat",
      "@css/vote",
      "@css/password",
      "@css/rcon",
      "@css/cheats",
      "@css/root",
      "@resetscore/admin"
    ]
  }
}
daffyyyy commented 9 months ago

Try with steamid64, its not plugin issue

asapverneri commented 9 months ago

I tried with both steamid's and it doesn't make any difference. All commands work throught game server's console tho. But since this is not plugin issue maybe i try to open an issue in cssharp's end.

daffyyyy commented 9 months ago

Reference in new is

cssharp fixed ur issue?

asapverneri commented 9 months ago

Reference in new is

cssharp fixed ur issue?

I've got it working.