ID:144511
 
I got this code in my project:
mob/Logout()
world << "[src] has left!"
players-=src.key
del(src)
..()


But for some reason, everytime I enter it says that... (didnt check if it says that when I leave, cuz I cant host and check... right now im doing personal testings)
1) The ..() after del(src) is useless (..() continues everything but what is there to continue if the source has been deleted? Switch those lines around)

2) Sounds like you're doing one of those temp-created-mobs login. You can either:
- Specify the mob and call it:
mob/Logout()
if(istype(src,/mob/create)) //igf the mob path is mob/create
del src //deletes the mob right away
..()
del src //regular mob deletion


- Make the mob/Logout() more precise:
mob/PLAYER/Logout()
...


- Do what AD's Creation thing is, make it a client/Login() rather than mob/Login() >_>

Just to inform you, mob/Logout() is called whenever the client leaves a mob (switching a mob, etc).

- GhostAnime
In response to GhostAnime
k ty.
In response to Souloron
You're welcome.

- GhostAnime