proc/RemoveFromDeckEditor(var/card/A,var/mob/D)
if(A in D.DE_main_deck)
D.CleanDEList(D)
D.DE_main_deck -= A
if(A in D.DE_side_deck)
D.CleanDEList(D)
D.DE_side_deck -= A
if(A in D.DE_extra_deck)
D.CleanDEList(D)
D.DE_extra_deck -= A
D.ShowActiveList(D)
Problem description:
All the procs work correctly but sometimes there is an off chance, the code will not call the final proc and I know this because I have debug messages in each of the procs saying if they are starting or not. On this random chance, the final proc (D.ShowActiveList(D)) will not start at all but I've put no sleep() or returns anywhere within the code. I'm really confused as to why this is happening with no apparent explanation.
#define DEBUG 1
to your code to see if you're getting any runtime errors.