Error when deleting exit from location - HELP PLEASE!

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
Lazzah
Moderator
Posts: 2473
Joined: Thu Mar 31, 2011 5:54 am
Points: 90
Location: Clacton-on-Sea, Essex

Error when deleting exit from location - HELP PLEASE!

Post by Lazzah »

Hi all, can somebody please tell me what is going wrong?

In my current WIP, in some locations when I try to change a previously defined exit to {No Location Selected] I get this error popup:
Error Popup.JPG
Error Popup.JPG (28.7 KiB) Viewed 368 times
The details are as follows:

************** Exception Text **************
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 ADRIFT.clsMap.UpdateMap(clsLocation loc)
at ADRIFT.frmLocation.ApplyLocation()
at ADRIFT.frmLocation.btnOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButtonBase.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
dev500

This driving me nuts and stops me from altering my game.

Many thanks in anticipation.
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Denk
Posts: 782
Joined: Mon Feb 22, 2016 6:21 pm
Points: 291
Location: Hjørring, Denmark

Re: Error when deleting exit from location - HELP PLEASE!

Post by Denk »

I am not sure if this will work so please make a backup of your game before trying this.

As far as I remember, I have tried something similar once, and I think the following might work:

If you go to Settings, there is an area on the General pane called "Prompts":
Prompts.png
Prompts.png (23.97 KiB) Viewed 359 times
I don't know which situation the problems occurs in, but as far as I remember, it helped to set all three prompts to Never, just temporarily, before changing some location exits.
Well, "Replace Character Names" probably doesn't matter but the two first prompts is related to changing exits.

Once you are done, you can hopefully change them back without problems.
Hope this helps.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Lazzah
Moderator
Posts: 2473
Joined: Thu Mar 31, 2011 5:54 am
Points: 90
Location: Clacton-on-Sea, Essex

Re: Error when deleting exit from location - HELP PLEASE!

Post by Lazzah »

Thanks for the reply, Denk, my Prompts settings are already set to those options.

Strangely, even though those popups appeared the [No Location Selected] options were selected, so maybe there is a bug in ADRIFT?
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Campbell
Site Admin
Posts: 4736
Joined: Sun Jun 23, 2002 12:05 pm
Points: 0
Location: Edinburgh, Scotland
Contact:

Re: Error when deleting exit from location - HELP PLEASE!

Post by Campbell »

Is it reproducible? Are you able to give me an example to look at?
ADRIFT Developer developer.
User avatar
P/o Prune
Site Admin
Posts: 4858
Joined: Mon Jun 24, 2002 9:18 am
Points: 133
Location: Denmark

Re: Error when deleting exit from location - HELP PLEASE!

Post by P/o Prune »

It looks like the same issue I had some time ago.
It's been a while, so this is typed from memory.
I think I had a restriction along with the direction. And what I did, was deleting the restriction first, then click apply (or ok)
Then i deleted the direction and it worked.
D-Day in progress 86Kb (Slowly drifting)
October 31st: 93Kb (possible entry for IFComp 2021 :wink: )
User avatar
Campbell
Site Admin
Posts: 4736
Joined: Sun Jun 23, 2002 12:05 pm
Points: 0
Location: Edinburgh, Scotland
Contact:

Re: Error when deleting exit from location - HELP PLEASE!

Post by Campbell »

I can't get it to error.
ADRIFT Developer developer.
User avatar
Lazzah
Moderator
Posts: 2473
Joined: Thu Mar 31, 2011 5:54 am
Points: 90
Location: Clacton-on-Sea, Essex

Re: Error when deleting exit from location - HELP PLEASE!

Post by Lazzah »

Campbell wrote:I can't get it to error.
Next time it happens in one of my games I will send the .taf file to you and explain how to trigger the error.
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Campbell
Site Admin
Posts: 4736
Joined: Sun Jun 23, 2002 12:05 pm
Points: 0
Location: Edinburgh, Scotland
Contact:

Re: Error when deleting exit from location - HELP PLEASE!

Post by Campbell »

Thanks. :)
ADRIFT Developer developer.
Post Reply