I've been getting a lot of complaints about with my newest version mobs do not get deleted when they should, instead their icon goes away and they are invisible yet still there.
My question is what would cause this?
the way I delete the mobs is pretty simple, I do a
del(src) with src being the mob at the end of a procedure. In my mob/Del() proc I modified it but I put a ..() to call the basic Delete functions.
Now the hard part that i'm not quite sure I am doing right. I wasn't sure if I had to put src.Logout() if there was a client to the mob or not... but I just recently read through the reference again and noted that it said that del does the Logout for you if there is one...
another question is this -
the example given uses del like so...
del usr
now I'm using it like del(usr)
am I using it correctly? Or is it just a preference of how you want to do it?
Should I be using del or should I be actually just calling the proc Del directly?
ID:268308
Jun 7 2004, 1:07 pm
|
|
What you're probably doing is saving a reference of that mob in a atom.variable somewheres. So, when that person who's stored in someone else' variable saves, it also saves that person. And, when that person logs back in, that person is also logged back in. Solution: make all referenced variables mob/var/tmp.
|
In response to Goku72
|
|
ooo thank you :) I believe you fixed it... I was always wondering howcome it was doing that, couldn't find help anywhere in the guide/reference, etc... sigh :P Thanks :)
|
Jon Snow wrote:
I've been getting a lot of complaints about with my newest version mobs do not get deleted when they should, instead their icon goes away and they are invisible yet still there. Usually just bad code. the way I delete the mobs is pretty simple, I do a What should do. Now the hard part that i'm not quite sure I am doing right. I wasn't sure if I had to put src.Logout() if there was a client to the mob or not... but I just recently read through the reference again and noted that it said that del does the Logout for you if there is one... You must have read an old copy of the reference, because any newer copy has fixed most of Dan's indiscretions with usr. del(src) would be correct here. But the parentheses aren't strictly necessary. Should I be using del or should I be actually just calling the proc Del directly? You should use del, not Del(). Lummox JR |
Yes, you don't need to worry about Logout(), it only concerns mobs with clients.
Simply call del(M) or whatever the mob is.
When this is called on a mob, all of its properties (contents, icon, etc.) are deleted aswell.