Jump to content

Generateconfigs Fails (Trying to Convert to V2)

Pending 2.0.5

ColorMehJewish
ColorMehJewish

Posted

Hello,

 

I'm running into a problem when trying to convert my old files to the new version. When I am loading the server I have the newest ShoppyStock plugin file in my carbon/plugins folder. It loaded properly b/c I got the instructions to move my old files.

 

[ShoppyConverter]                                                          
[ShoppyConverter]                  ShoppyConverter Loaded                  
[ShoppyConverter]         This plugin is meant to be used only once        
[ShoppyConverter]      to convert your ShoppyStock 1.0 config into the     
[ShoppyConverter]                     new 2.0 version.                     
[ShoppyConverter]    The 2.0 version contains more options, so it is       
[ShoppyConverter]    recommended to check the new config for changes.      
[ShoppyConverter]                                                          
[ShoppyConverter]           To make the plugin work, just move your:       
[ShoppyConverter]  Old ShoppyStock config into /data/ShoppyConverter/Old/config
[ShoppyConverter] Old ShoppyStock data folder into /data/ShoppyConverter/Old/data
[ShoppyConverter]                                                          
[ShoppyConverter]                When everything is in place,              
[ShoppyConverter]              run the generateconfigs command.            
[ShoppyConverter]             You need to be an admin to do that!          
[ShoppyConverter]                                                        

 

Then I let the server finish loading and type the generateconfigs command as instructed (after moving the files via FTP). I receive the following error and no further instruction. 

 

Failed executing console command 'generateconfigs' in 'ShoppyConverter v1.0.1 by ThePitereq' [callback] (Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[System.String]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'Commands['Permission Required To Run Any Command (not required, if empty)']', line 3, position 70.)
   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 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<PluginConfig>(string value, JsonSerializerSettings settings)
   at PluginConfig Oxide.Core.Configuration.DynamicConfigFile.ReadObject<PluginConfig>(string filename) in /__w/Carbon/Carbon/Carbon.Core/Carbon.Components/Carbon.Common/src/Oxide/Configuration/DynamicConfigFile.cs:line 30
   at PluginConfig Oxide.Core.DataFileSystem.ReadObject<PluginConfig>(string name) in /__w/Carbon/Carbon/Carbon.Core/Carbon.Components/Carbon.Common/src/Oxide/Configuration/DataFileSystem.cs:line 63
   at void Oxide.Plugins.ShoppyConverter.LoadData() in E:/TCAFiles/Users/noelle/130211/carbon/plugins/ShoppyConverter.cs:line 435
   at void Oxide.Plugins.ShoppyConverter.GenerateConfigsCommand(Arg arg) in E:/TCAFiles/Users/noelle/130211/carbon/plugins/ShoppyConverter.cs:line 49
   at object System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)

 

I am following the instructions and moved the folders requested into the /data/ShoppyConverter/Old/ config and data folders respectively. The files do not exist in their original locations anymore since it says "move your files".

 

Thank you

 

 

 

ThePitereq

Posted

Hey, sorry for waiting i was on vacations.

Can you provide me your whole pack of /Old/ files in an zip please? If you want you can send it to me in private message if you dont nwant to share it.

ThePitereq

Posted

Based on what you've sent you've put new config from 2.0 into Old folder, where 1.0 should be, This is why it prints that error.

ColorMehJewish

Posted

That's no problem.

I had sent over a PM w/ the zip file.

I'm really hoping I did not completely break the shop I had. Is there any tutorial for setting the shop up again from scratch if you're starting a shop w/ the new version? I wanted to create a separate shop for different currencies like scrap and RP, but I did not set the shop up originally (and I do not have that person to help anymore). 

ColorMehJewish

Posted

So if I find the original files I would just have to put them in this folder and it would work?

 

Also, I might've lost the original. Do you happen to have any tutorials on making the stores from scratch if starting w/ the new version?

ThePitereq

Posted

6 minutes ago, ColorMehJewish said:

So if I find the original files I would just have to put them in this folder and it would work?

 

Also, I might've lost the original. Do you happen to have any tutorials on making the stores from scratch if starting w/ the new version?

You have the default config with some preview values generated, if you need any help with anything, just feel free to ask. It's hard for me to answer for "everything" as there is hundrets of possibilities 😄

ColorMehJewish

Posted

No problem lol understandable --- I'm just trying to figure out how to bring my RP shop back. Once I get that figured out I would like to add a second shop but I will need to lookup some tutorials and work on that separately. I'm sure SRTBull has one he's got a tutorial for everything 🤣

 

But regarding what I need to do to finish converting the files I sent, would I just need to place the 1.0 config into that old folder and reboot the server? Would that get everything to finish converting?

Also, do I remove the converter plugin once the 1.0 shop converts to 2.0? And is there any way for me to identify the 1.0? (file extension type, or if I have a backup of my files... where would I grab the 1.0 file again?)

 

Thank you for the help -- I just don't want to mess things up worse so Im probably overthinking this.

ThePitereq

Posted

But regarding what I need to do to finish converting the files I sent, would I just need to place the 1.0 config into that old folder and reboot the server? Would that get everything to finish converting?

YOu just load the config there, reload the plugin and run command to convert.

Also, do I remove the converter plugin once the 1.0 shop converts to 2.0? And is there any way for me to identify the 1.0? (file extension type, or if I have a backup of my files... where would I grab the 1.0 file again?)

Yes, you don't need converter anymore. In 1.0 you don't have any config groups, so instead of one group for all comamnd things you just have list of command fields, so in 1.0 config it starts with 

  "Commands": [... and then is list of commands

While in 2.0 it startas iwth 

"Commands": {... and then you have another fields which then they contain commands.

Also the 2.0 config ends with "Last Config Version (do not modify)": "2.0.0"

1.9m

Downloads

Total number of downloads.

9.1k

Customers

Total customers served.

133.5k

Files Sold

Total number of files sold.

2.8m

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.