Whenever i want to delete an item in the users inventory i use this:
for(var/obj/Food/F in usr)
del(F)
But that deletes all objects with that name, how do I make it delete only one of them?
Thanks
ID:175218
May 24 2003, 9:00 am
|
|
I'm fairly sure you want to be using src, not usr here. Also, the if(F) is important, because if nothing is found, locate() will return null, and trying to delete something that is null results in a runtime error.