ID:176692
 
how do I Delete a specific item out of A usr's inventory contents (not using del(src))


usr.inventory.Remove(item) should take the item out of the list without deleting the actual item.
-DogMan
In response to Dog Man (#1)
Err no :-O that doesnt work.... example (I know this doesnt work)

del(/obj/bronze)

thats how i kinda want it (EXCEPT i want it to delete that bronze that the usr is carryiing in his/her contents like del(*obj*from*usr* or some-thing like that, i cannot think atm my hands are too sore so yeah... :-)

In response to Wanabe (#2)
del( locate(/obj/bronze) in usr )
In response to Garthor (#3)
Thank you Garthor that worked perfect :-)
In response to Dog Man (#1)
Dog Man wrote:
usr.inventory.Remove(item) should take the item out of the list without deleting the actual item.

If that were to work at all, you'd first need to change "inventory" to "contents". :-)

But I think contents is a special kind of list anyway, so that wouldn't work.
In response to Crispy (#5)
I think he meant delete it from the inventory's contents, not the usr's contents.
-DogMan
In response to Dog Man (#6)
Garthor wrote:
del( locate(/obj/bronze) <font color=white>in usr</font> )

Wanabe wrote:
Thank you Garthor that worked perfect :-)

What were you saying, Dog Man? :-D
In response to Crispy (#7)
Doh. I forgot to use past tense in my last post. I meant to say I thought that was what he meant.
-DogMan