Jump to content

WaterEvent not compiling

Pending 2.2.0

Flint Monkey
Flint Monkey

Posted

I'm using Carbon as my mod framework. When I execute creload WaterEvent, I get the following in console:

c.reload WaterEvent

[WaterEvent] Failed ILoadConfig (Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.String,Oxide.Plugins.WaterEvent+SpawnInfoNpc]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '['NPCs setting outside']', line 1044, position 27.)
   at JsonArrayContract Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, object existingValue, string id)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
   at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
   at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at object Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at object Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings)
   at PluginConfig Newtonsoft.Json.JsonConvert.DeserializeObject(string value, JsonSerializerSettings settings)
   at PluginConfig Oxide.Core.Configuration.DynamicConfigFile.ReadObject(string filename) in D:/a/Carbon/Carbon/Carbon.Core/Carbon.Components/Carbon.Common/src/Oxide/Configuration/DynamicConfigFile.cs:line 30
   at void Oxide.Plugins.WaterEvent.LoadConfig() in C:/TCAFiles/Users/************/140715/carbon/plugins/WaterEvent.cs:line 38
   at void Oxide.Plugins.RustPlugin.ILoadConfig() in D:/a/Carbon/Carbon/Carbon.Core/Carbon.Components/Carbon.Common/src/Oxide/RustPlugin.cs:line 235

Loaded plugin WaterEvent v2.2.0 by KpucTaJl [454ms]

Failed to call internal hook 'OnServerInitialized' on plugin 'WaterEvent v2.2.0' [352240293] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.WaterEvent.CheckAllLootTables() in C:/TCAFiles/Users/************/140715/carbon/plugins/WaterEvent.cs:line 3487
   at void Oxide.Plugins.WaterEvent.OnServerInitialized() in C:/TCAFiles/Users/************/140715/carbon/plugins/WaterEvent.cs:line 1555
   at object Oxide.Plugins.WaterEvent.InternalCallHook(uint hook, object[] args) in WaterEvent.cs/Internal:line 555

 

Jbird

Posted

On 12/5/2024 at 9:46 PM, Flint Monkey said:

I'm using Carbon as my mod framework. When I execute creload WaterEvent, I get the following in console:

c.reload WaterEvent

[WaterEvent] Failed ILoadConfig (Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.String,Oxide.Plugins.WaterEvent+SpawnInfoNpc]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '['NPCs setting outside']', line 1044, position 27.)
   at JsonArrayContract Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, object existingValue, string id)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
   at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
   at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
   at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at object Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at object Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings)
   at PluginConfig Newtonsoft.Json.JsonConvert.DeserializeObject(string value, JsonSerializerSettings settings)
   at PluginConfig Oxide.Core.Configuration.DynamicConfigFile.ReadObject(string filename) in D:/a/Carbon/Carbon/Carbon.Core/Carbon.Components/Carbon.Common/src/Oxide/Configuration/DynamicConfigFile.cs:line 30
   at void Oxide.Plugins.WaterEvent.LoadConfig() in C:/TCAFiles/Users/************/140715/carbon/plugins/WaterEvent.cs:line 38
   at void Oxide.Plugins.RustPlugin.ILoadConfig() in D:/a/Carbon/Carbon/Carbon.Core/Carbon.Components/Carbon.Common/src/Oxide/RustPlugin.cs:line 235

Loaded plugin WaterEvent v2.2.0 by KpucTaJl [454ms]

Failed to call internal hook 'OnServerInitialized' on plugin 'WaterEvent v2.2.0' [352240293] (Object reference not set to an instance of an object)
   at void Oxide.Plugins.WaterEvent.CheckAllLootTables() in C:/TCAFiles/Users/************/140715/carbon/plugins/WaterEvent.cs:line 3487
   at void Oxide.Plugins.WaterEvent.OnServerInitialized() in C:/TCAFiles/Users/************/140715/carbon/plugins/WaterEvent.cs:line 1555
   at object Oxide.Plugins.WaterEvent.InternalCallHook(uint hook, object[] args) in WaterEvent.cs/Internal:line 555

Can you confirm that Carbon is updated?

Youknowmarcus

Posted (edited)

.

Edited by Youknowmarcus
Youknowmarcus

Posted (edited)

.

Edited by Youknowmarcus
Jbird

Posted

5 hours ago, Youknowmarcus said:

took server offline installed plugin but plugin still not running

Can you confirm carbon is updated?

The plugin looks like the right version, can you also confirm the version of NpcSpawn?

Flint Monkey

Posted

20 hours ago, Jbird said:

Can you confirm that Carbon is updated?

I am running the following:

Carbon 2.0.159.0

NPCSpawn v2.7.9

Jbird

Posted

11 hours ago, Flint Monkey said:

I am running the following:

Carbon 2.0.159.0

NPCSpawn v2.7.9

Just realized there are two people in the ticket. Are you working together?

Is that the most recent version of carbon? I don't have a bookmark to check the current version.

Jbird

Posted

31 minutes ago, Youknowmarcus said:

Oops sorry though I made a new thread xD 

All good I didn't even notice at first.

Flint Monkey

Posted

I deleted all data for this plugin and started from scratch; I then went through and copied my config changes from the old config file and applied them to the new. that fixed the plugin not loading... however, I now have another issue and will log a separate ticket.

Jbird

Posted

1 hour ago, Flint Monkey said:

I deleted all data for this plugin and started from scratch; I then went through and copied my config changes from the old config file and applied them to the new. that fixed the plugin not loading... however, I now have another issue and will log a separate ticket.

Heard, this ticket is resolved then for now correct?

Jbird

Posted

1 hour ago, Flint Monkey said:

Yes it is, thanks

Awesome, you are welcome. Thank you as well for the update.

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.3k

Files Sold

Total number of files sold.

2.3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.