I know that mob.Logout() is called when at client.Del(). Is it called during the proc, or after the proc has completed? I can't recall.
I'm having an issue in a game of mine where, from what it seems, the player's mob is not saving/loading properly, and when it is tried to load a corrupted mob, it just loads a blank player mob. When that mob is loaded and tries to logout, the world crashes. I'm trying to see if it is an issue of bad deletion timing when it's trying to be saved.
It's an issue that started to occur in a newer version of the game that isn't in an older version. Unfortunately, I no longer have an older version's source (i do have the host files and the rsc though) so I have no way of comparing without an RSC decompiler or something.
ID:273514
Jul 9 2010, 9:45 am
|
|
In response to Keeth
|
|
So, the client deletion occurs before the mob logs out? Alright, that might actually help right there. Let me do a little testing first, then if it doesn't resolve anything I'll post both my client/Del() and my mob/player/Logout() and see what's going on.
|
Corrupted savefiles are a result of poor saving practices 9 times out of 10. Post what your saving code looks like.
|
In response to Garthor
|
|
It's all good now. It had to do with something I was doing in mob/Logout() that should've been done in client/Del(). I needed to clarify what was called when to be sure. Thanks for the help guys.
|
This code prints the following:
This indicates the client is deleted before Logout() starts, by default.
I also manually crashed Logout() to grab the "stack trace" I think it's called:
This shows that client/Del() does not directly call Logout().
If it did, the trace would look something like this:
This is probably a case of the reference to the client disappearing, causing mob/Logout() to be called.
Sorry about that... but anyway...
It'd be nice to see what you're doing in Logout(), or if you have any error logs, so we can determine what the issue is exactly.