ID:138679
 
I'm curious if I can use del(Ref) for objects stored in lists.

Example:
mob/var/list/Wounds[0] // contains a list of obj/wounds
obj/wounds // The Wounds!

During the healing process, once the wound is healed I wrote the code to del(O) where O is the specific wound in the list.

I was just curious (since I can't test it right now) if I'll need to change that to List.Remove(O) or if del(Ref) will work.
On 3/24/00 11:44 pm Gabriel wrote:
I'm curious if I can use del(Ref) for objects stored in lists.

Nope. You'll have to do List.Remove(O) or List -= O. "Del" is used to actually delete the reference itself. That is, if you had an actual object in the list, "del" would remove it from the world.

You have made a pretty good suggestion though, so I'll keep it in mind for a possible notational enhancement.