ID:261260
 
How do I make it so when a person logs out, their inventory is deleted?

mob
Logout()
usr.contents = null

That doesn't work. What am I doing wrong?
mob
Logout()
for(var/obj/O in src.contents)
del(O)
..()

always call ..() in a defualt proc. otherwise it wont do what its supposed to do.

FIREking
The Wizard of How wrote:
How do I make it so when a person logs out, their inventory is deleted?

mob
Logout()
usr.contents = null

That doesn't work. What am I doing wrong?

I think the problem is that you're using usr instead of src. However, manually deleting each item in src.contents ought to be a better way to go.

Lummox JR