ID:176849
 
For some reason when ever I kill a mob on my game it kicks me out I think mabe its something to do with the delete source code for when something dies, can somone please tell me how I can stop this. Here is my code:

mob/proc/deathcheck(mob/M as mob)
if(M.hp<=0)
if(M.client)
M.loc = locate(1,1,1)
M.hp = M.maxhp
M<<"[src] killed you!"
else
src<<"You killed [M]!" del(src) var/obj/gold/G = new(loc) G.amount = rand(1,100)

Thanks
You have in the last line src<<"whatever>" del(src)
that means that it will say to the winner that <whatever> and will delete him, replace that part with
usr<<"whatever" del(m)
In response to Muska
o thx
Strictly speaking, this is more of a "kill check". A death check would belong to the mob that's dying, and the argument M would be whoever killed them.

Lummox JR