Crrect me if m wrong
client / New --> mob/Login --> Game Play -->mob/Logout --> client /Del
now client new returns a mob.
check this out
mob/Logout()
src.Save()
.() // this is logout proc
..() // this is client del proc
when one client is disconected from mob - it will get deleted bcz of the "..()" but if its ".()" it will only disconect the mob but the client stays alive ..
Am I correct ..?
what if i want to like switch savs / i should only use .()
right?
You've also got .() very wrongly - that just calls the current proc, and is pretty much a shortcut. The following 2 procs are equivalent:
And, of course, doing such a thing will cause a crippling infinite loop (until the proc crashes), and it's the same in your Logout() example.
Getenks wrote:
You don't really understand how it precisely works, and the order for logging out is a little different. Here's how the procs are executed (they just end up being called by one another, pretty much, no parent proc calls involved):
When a player logs in: client/New() is called, which normally logs the player into a mob, which calls Login() on that mob.
When a player logs out: client/Del() is called, which normally calls Logout() on the player's mob. Afterward, the client is deleted.
(I said "normally" because it's of course possible for developer overrides to manipulate the behavior)