NullReferenceException when loading pluginSolved
Very often I get spam errors in the console. I can't say what it depends on and what they do at the same time.
[08.02.2022 19:14:56] [Oxide] 19:14 [Error] Failed to call hook 'OnDieselEngineToggle' on plugin 'ExcavatorLock v0.4.5' (JsonReaderException: After parsing a value an unexpected character was encountered: Э. Path 'ExcavatorFuel', line 9, position 36.)
at Newtonsoft.Json.JsonTextReader.ParsePostValue () [0x00179] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonTextReader.Read () [0x0005a] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary (System.Collections.IDictionary dictionary, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonDictionaryContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x0028b] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x002a8] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0006d] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000d9] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in <2ae3f091decd4989b3c4d466e6eb5985>:0

at Oxide.Core.Libraries.Lang.GetMessageFile (System.String plugin, System.String lang) [0x00067] in <dfcb48ea05694263bbc08e62a39c274c>:0

at Oxide.Core.Libraries.Lang.GetMessageKey (System.String key, Oxide.Core.Plugins.Plugin plugin, System.String lang) [0x00036] in <dfcb48ea05694263bbc08e62a39c274c>:0

at Oxide.Core.Libraries.Lang.GetMessage (System.String key, Oxide.Core.Plugins.Plugin plugin, System.String userId) [0x00017] in <dfcb48ea05694263bbc08e62a39c274c>:0

at Oxide.Plugins.ExcavatorLock.Lang (System.String key, System.String id, System.Object[] args) [0x00000] in <39f9204d4e4e4014bbbce40bf307c153>:0

at Oxide.Plugins.ExcavatorLock.OnDieselEngineToggle (BasePlayer player, DieselEngine engine) [0x000df] in <39f9204d4e4e4014bbbce40bf307c153>:0

at Oxide.Plugins.ExcavatorLock.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0051a] in <39f9204d4e4e4014bbbce40bf307c153>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <dfcb48ea05694263bbc08e62a39c274c>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <dfcb48ea05694263bbc08e62a39c274c>:0

This error is related to a syntax error in the language files. ( .\oxide\lang\ * \ExcavatorLock.json )

If you modified the lang files or added a new translation, you can use https://jsonlint.com/ to validate the files.
you can also delete the lang files and restart the plugin to regenerate the default files.

Yes, you're right. For some reason, there was no line in my lang file: "ExcavatorAvailableIn": "Giant Excavator {0} will be available in {1,2:F0} min." Thank you very much.

Locked automatically