Issue error messages when loading game, how to fix

lesmiley

Newcomer
Using windows on me PC
[NPC Map Locations] This mod failed in the GameLoop.SaveLoaded event. Technical details:
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at NPCMapLocations.ModCustomizations.AddCustomMapLocation(String locationName, JArray mapLocations) in C:\Users\bouhm\projects\stardew-valley-mods\NPCMapLocations\data\ModCustomizations.cs:line 215
at NPCMapLocations.ModCustomizations.LoadCustomLocations(Dictionary`2 customLocationJson) in C:\Users\bouhm\projects\stardew-valley-mods\NPCMapLocations\data\ModCustomizations.cs:line 47
at NPCMapLocations.ModCustomizations.LoadCustomData(Dictionary`2 CustomNpcJson, Dictionary`2 CustomLocationJson) in C:\Users\bouhm\projects\stardew-valley-mods\NPCMapLocations\data\ModCustomizations.cs:line 41
at NPCMapLocations.ModMain.GameLoop_SaveLoaded(Object sender, SaveLoadedEventArgs e) in C:\Users\bouhm\projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 162
at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 125
 
Last edited by a moderator:
Top