ID:140079
 
Code:
mob/takedamage(var/obj/bullet/B)
if(B)
src.hpthings()
if(src.LeftStimulant)
B.power-=src.LeftStimulant.power
src.hp-=B.power
world<<"[src.hp]"
src.hpthings()
del B
else
src.hpthings()
mob/proc/hpthings()
if(usr.hp<1)
del src
else
winset(src,"infowindow.bar1","value=[hp]")
obj/bullet/Bump(mob/M)
if(istype(M,/mob))
M.takedamage(src)
atom/proc/takedamage()


Problem description:

I've never gotton the "bad client" error before so i have no idea how to fix it.

runtime error: bad client
proc name: hpthings (/mob/proc/hpthings)
usr: 0
src: the mob (/mob)
call stack:
the mob (/mob): hpthings()
the mob (/mob): takedamage(the bullet (/obj/bullet))
the bullet (/obj/bullet): Bump(the mob (/mob))
runtime error: bad client
proc name: hpthings (/mob/proc/hpthings)
usr: 0
src: the mob (/mob)
call stack:
the mob (/mob): hpthings()
the mob (/mob): takedamage(the bullet (/obj/bullet))
the bullet (/obj/bullet): Bump(the mob (/mob))

is the output of "shooting" an npc with a bullet
You're trying to use winset on a clientless A.I mob. also wouldn't hurt to use hp<1 instead of usr.hp<1
In response to Leur
thanks, dont think ill run into that error again