Failed to load config file after editingSolved
Inkss
Im trying to Change the bot names to just Zombie or Scientists depending on what i have at each location. Whenever i change the name i get this error.

BotSpawn v1.9.0: Failed to load config file (is the config file corrupt?) (Unexpected character encountered while parsing value: S. Path 'Monuments.AirDrop.BotNames', line 27, position 19.)

Failed to initialize plugin 'BotSpawn v1.9.0' (JsonReaderException: Unexpected character encountered while parsing value: S. Path 'Monuments.AirDrop.BotNames', line 27, position 20.)
  at Newtonsoft.Json.JsonTextReader.ReadStringValue (Newtonsoft.Json.ReadType readType) [0x00366] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonTextReader.ReadAsString () [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, System.Boolean hasConverter) [0x00077] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (System.Collections.IList list, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x0016f] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) [0x001be] in <8fe7f8665ff548909c2f26d557e5093a>: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) [0x0007f] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00061] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00267] in <8fe7f8665ff548909c2f26d557e5093a>: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) [0x0015c] in <8fe7f8665ff548909c2f26d557e5093a>: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 <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00061] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00267] in <8fe7f8665ff548909c2f26d557e5093a>: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) [0x0015c] in <8fe7f8665ff548909c2f26d557e5093a>: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 <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00061] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00267] in <8fe7f8665ff548909c2f26d557e5093a>: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) [0x0015c] in <8fe7f8665ff548909c2f26d557e5093a>: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 <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000d9] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Oxide.Core.Configuration.DynamicConfigFile.ReadObject[T] (System.String filename) [0x00028] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Plugins.BotSpawn.LoadConfigVariables () [0x00007] in <0fded4b0b7814c9480c8778238cbf479>:0 
  at Oxide.Plugins.BotSpawn.Init () [0x00055] in <0fded4b0b7814c9480c8778238cbf479>:0 
  at Oxide.Plugins.BotSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00121] in <0fded4b0b7814c9480c8778238cbf479>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00043] in <4452f821def6406d834e4149849fe7ea>:0 ​
So i go to the line in which it states is causing the plugin not to load and i look and nothing is wrong (to my knowledge) and once i take out the name it works just fine. What am i doing wrong?
pookins
I hope you are just changing them in the Config Botspawn json file (?), can you post your config (using the "insert code" as it saves room :)  ) an example of mine is shown below.
as murderer is false they are scientists (murderers use mostly melee weapons, scientists use projectile weapons -guns/rifles)
 "Airfield": {
      "AutoSpawn": true,
      "Murderer": false,
      "Bots": 25,
      "BotHealth": 120,
      "Radius": 150,
      "Kit": [
        "green"
      ],
      "BotNamePrefix": "",
      "BotNames": [
        "Airforce Patrol"
      ],
      "Bot_Accuracy": 2,
      "Bot_Damage": 3.0,
      "Disable_Radio": false,
      "Roam_Range": 140,
      "Peace_Keeper": false,
      "Peace_Keeper_Cool_Down": 1,
      "Weapon_Drop_Chance": 0,
      "Keep_Default_Loadout": false,
      "Wipe_Belt": false,
      "Wipe_Clothing": false,
      "Allow_Rust_Loot": true,
      "Suicide_Timer": 800,
      "Chute": false,
      "Respawn_Timer": 600,
      "Sci_Aggro_Range": 120,
      "Sci_DeAggro_Range": 90​
Steenamaroo
Plugin Developer
Unexpected character encountered while parsing value: S. Path 'Monuments.AirDrop.BotNames'


The correct formatting is detailed in the overview. It's the same formatting used for Kits.
If the formatting is definitely correct then try eliminating any symbols which could cause issue.

You will only be warned/notified of the first error, so be sure to check through all instaces of 'BotNames' to be sure there isn't a repeated error.

Philoludos

And if it helps, just remove the gaps...


This...

"BotNames": [
        "dat bot tho"
            ],

...is the same as...

"BotNames": ["dat bot tho"],


If you need more than one name/kit...

"BotNames": [
        "dat bot tho",
        "dat other bot tho"
            ],

...and again, is the same as...

"BotNames": ["dat bot tho","dat other bot tho"],


In fact, if you look at the entire file's contents, it's just one long sentence. Here's a snippet of mine...

 

{"Global":{"NPCs_Attack_BotSpawn":true,"BotSpawn_Attacks_NPCs":true,"BotSpawn_Attacks_BotSpawn":false,"APC_Safe":true,"Turret_Safe":false,"Animal_Safe":false,"Supply_Enabled":false,"Remove_BackPacks":false,"Remove_KeyCard":true,"Ignore_HumanNPC":false,"Ignore_HTN":false,"Ignore_Sleepers":true,"Pve_Safe":true,"Corpse_Duration":120},"Monuments":{"AirDrop":{"AutoSpawn":true,"Murderer":false,"Bots":8,"BotHealth":120,


Hopefully, this helps you visualize the formatting required. 

Inkss
Original Poster
thank you everyone. I was forgetting to put the quotations around the name.