Nereziel / cs2-WeaponPaints

GNU General Public License v3.0
193 stars 51 forks source link

plugin error on startup #233

Closed VozDeOuro closed 3 months ago

VozDeOuro commented 5 months ago

I'm using the latest CSSharp version and the [Build 252]of the plugin and the plugin give this error when loading:


21:10:26 [EROR] (cssharp:PluginManager) Failed to load plugin from /home/container/game/csgo/addons/counterstrikesharp/plugins/WeaponPaints/WeaponPaints.dll
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'WeaponPaints.WeaponPaints' threw an exception.
 ---> System.ArgumentException: Method CAttributeList_SetOrAddAttributeValueByName not found in gamedata.json
   at CounterStrikeSharp.API.Core.GameData.GetSignature(String key) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/GameData.cs:line 94
   at WeaponPaints.WeaponPaints..cctor() in /home/runner/work/cs2-WeaponPaints/cs2-WeaponPaints/WeaponPaints.cs:line 97
   --- End of inner exception stack trace ---
   at WeaponPaints.WeaponPaints.OnConfigParsed(WeaponPaintsConfig config) in /home/runner/work/cs2-WeaponPaints/cs2-WeaponPaints/WeaponPaints.cs:line 266
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at CounterStrikeSharp.API.Core.BasePlugin.InitializeConfig(Object instance, Type pluginType) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/BasePlugin.cs:line 339
   at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 217
   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 125
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93```

   **and this error when joining** 

NetChan Setting Timeout to 20.00 seconds
21:11:27 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'WeaponPaints.WeaponPaints' threw an exception.
 ---> System.ArgumentException: Method CAttributeList_SetOrAddAttributeValueByName not found in gamedata.json
   at CounterStrikeSharp.API.Core.GameData.GetSignature(String key) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/GameData.cs:line 94
   at WeaponPaints.WeaponPaints..cctor() in /home/runner/work/cs2-WeaponPaints/cs2-WeaponPaints/WeaponPaints.cs:line 97
   --- End of inner exception stack trace ---
   at WeaponPaints.WeaponPaints.OnClientFullConnect(EventPlayerConnectFull event, GameEventInfo info) in /home/runner/work/cs2-WeaponPaints/cs2-WeaponPaints/Events.cs:line 15
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 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.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100```
fluffy-kaiju commented 5 months ago

Same ! with the 240 and 254 build

19:05:56 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'WeaponPaints.WeaponPaints' threw an exception.
 ---> System.ArgumentException: Method CAttributeList_SetOrAddAttributeValueByName not found in gamedata.json
   at CounterStrikeSharp.API.Core.GameData.GetSignature(String key) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/GameData.cs:line 94
   at WeaponPaints.WeaponPaints..cctor() in /home/runner/work/cs2-WeaponPaints/cs2-WeaponPaints/WeaponPaints.cs:line 97
   --- End of inner exception stack trace ---
   at WeaponPaints.WeaponPaints.OnClientFullConnect(EventPlayerConnectFull event, GameEventInfo info) in /home/runner/work/cs2-WeaponPaints/cs2-WeaponPaints/Events.cs:line 17
   at InvokeStub_GameEventHandler`1.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   --- End of inner exception stack trace ---
   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.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100
daffyyyy commented 3 months ago

Płacę weaponpaints.json (gamedata)