I have a list of objects (called l) and I want to remove one from the list. However the one I want to remove is stored in a variable (called ob) and for some reason Inform does not like:
remove ob from l if present;
Problem. You wrote ‘remove ob from l if present’ , but ‘ob’ is a temporary name for a thing (created by ‘let’ or ‘repeat’), whereas I was expecting to find a list of values there.
Which suggests you can only remove set things from lists rather than calculated values.
I cannot find any example which does this and the manual only shows you removing constants (like remove cap from l if present or remove 7 from l if present.
Short of having a loop and copying everything from one list to another minus whatever is in ob I’m stumped.
Is there any way of removing something in a variable from a list?