Nereziel / cs2-WeaponPaints

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

Help #247

Closed Bilibili-Summer closed 5 months ago

Bilibili-Summer commented 5 months ago

I found that it loaded failed in game, and I opened the log folder

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 270
   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 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 392
   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

How can I fix it? thanks

Bilibili-Summer commented 5 months ago

Ok I already fixed it. Put the file in "gamedata" folder into [cssharp]/gamedata