So im having an issue saving data to a local file. I've narrowed down the error to a certain part of my data but im not sure what is causing it.
[JSON] { "clans": [ { "ClanID": "12345", "CreatedAt": "02/24/2018 - Pastebin.com
The pastebin above is my current data, the error occurs at GlobalPrints, other than that im not too sure whats going on. Full error is below:
Code:Failed to initialize plugin 'Unleashed v0.1.1' (ArgumentNullException: Argument cannot be null. Parameter name: s) at ulong.Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) <0x0007a> at ulong.Parse (string) <0x00024> at Oxide.Plugins.Unleashed/Clan..ctor (string,string,string) <0x00366> at (wrapper dynamic-method) Oxide.Plugins.Unleashed/Clan.Void .ctor(String, String, String) (object[]) <0x000c8> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters (Newtonsoft.Json.JsonReader,Newtonsoft.Json.Serialization.JsonObjectContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.ObjectConstructor`1<object>,string) <0x00c6f> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject (Newtonsoft.Json.JsonReader,Newtonsoft.Json.Serialization.JsonObjectContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonProperty,string,bool&) <0x00199> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader,System.Type,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContainerContract,Newtonsoft.Json.Serialization.JsonProperty,object) <0x00477> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader,System.Type,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContainerContract,Newtonsoft.Json.Serialization.JsonProperty,object) <0x000cf> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (System.Collections.IList,Newtonsoft.Json.JsonReader,Newtonsoft.Json.Serialization.JsonArrayContract,Newtonsoft.Json.Serialization.JsonProperty,string) <0x00525>
Data Saving - Serializer Issue
Discussion in 'Rust Development' started by DylanSMR, Feb 25, 2018.
-
Calytic Community Admin Community Mod
Hard to say exactly without the code, and I suspect this is a private/paid plugin..
But it looks like you're deserializing json that is then instantiating a "Clan" object and the "Clan" constructor requires constructor arguments that are not being provided
So you might want to consider..
a) JsonConstructor: JsonConstructorAttribute
b) Adding a constructor that does not require arguments -