Jump to content

Convert Loot Manager Command

Pending 3.2.4

dustyhansen
dustyhansen

Posted

I get this error in console when I try to run convertlootmanager:

convertlootmanager
Failed executing command (An item with the same key has already been added. Key: loottables)
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <f98723dd4586469db5213ec59da723ca>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <f98723dd4586469db5213ec59da723ca>:0 
  at Oxide.Plugins.NpcSpawn.ConsoleCommandConvertLootManager (ConsoleSystem+Arg arg) [0x000d0] in /home/container/carbon/plugins/NpcSpawn.cs:10308 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <f98723dd4586469db5213ec59da723ca>:0 

 

aimacak

Posted

7 hours ago, dustyhansen said:

I get this error in console when I try to run convertlootmanager:

convertlootmanager
Failed executing command (An item with the same key has already been added. Key: loottables)
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <f98723dd4586469db5213ec59da723ca>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <f98723dd4586469db5213ec59da723ca>:0 
  at Oxide.Plugins.NpcSpawn.ConsoleCommandConvertLootManager (ConsoleSystem+Arg arg) [0x000d0] in /home/container/carbon/plugins/NpcSpawn.cs:10308 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <f98723dd4586469db5213ec59da723ca>:0 

 

Hello, I'm sorry for the long answer, did you just install NpcSpawn.cs 3.2.2 (first version with this update) and write to the console ConvertLootManager 1 time? Did you manage to solve the problem? Do you have backup files before starting the update?

dustyhansen

Posted

On 2/22/2026 at 7:01 PM, aimacak said:

Hello, I'm sorry for the long answer, did you just install NpcSpawn.cs 3.2.2 (first version with this update) and write to the console ConvertLootManager 1 time? Did you manage to solve the problem? Do you have backup files before starting the update?

No, I didn't see that there was an update before 3.2.4. I haven't done anything since getting the error. I don't have backup files from 2 days ago, no.

aimacak

Posted

5 hours ago, dustyhansen said:

No, I didn't see that there was an update before 3.2.4. I haven't done anything since getting the error. I don't have backup files from 2 days ago, no.

Please, if exitst, send config files:
config/NpcSpawn
config/NpcSpawn_old
config/BetterNpc
config/BetterNpc_old

and data files:
data/BetterNpc
data/BetterNpc_old
data/NpcSpawn/Preset
data/LootManager/LootTables

aimacak

Posted

On 2/22/2026 at 8:42 PM, dustyhansen said:

I get this error in console when I try to run convertlootmanager:

convertlootmanager
Failed executing command (An item with the same key has already been added. Key: loottables)
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <f98723dd4586469db5213ec59da723ca>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <f98723dd4586469db5213ec59da723ca>:0 
  at Oxide.Plugins.NpcSpawn.ConsoleCommandConvertLootManager (ConsoleSystem+Arg arg) [0x000d0] in /home/container/carbon/plugins/NpcSpawn.cs:10308 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <f98723dd4586469db5213ec59da723ca>:0 

 

I think this is my mistake, because almost all tickets with any problems were related to BetterNpc, I apologize. Let's take it in order.

Your error was due to the fact that you had 2 files with the same name but with a different extension in the data/LootManager/LootTables/ folder. But you didn't need the conversion itself, because NpcSpawn presets are currently used only by BetterNpc, meaning you have nothing to convert.

For now, just make sure that you don't have UpdaterNpcSpawn.cs in the plugins folder, delete the configuration NpcSpawn.json and upload the latest version of NpcSpawn.cs to the plugins folder.

image.png

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.8k
Customers served
Files Sold
155.6k
Marketplace sales
Payments
3.3m
Processed total
×
×
  • 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.