ID:146145
 
Code:
mob/verb/Melee(mob/male/M as mob in oview(1))
set category = "Actions"
if(istype(M,/mob/NPCs/))
return 0
else

var/damage = round(src.Taijutsu - M.Defense+rand(1,5))
if(src.doing==0)
if(damage <= 0)
src.doing=1
src<<"You start attacking [M]"
flick(pick("punch","kick"),usr)
sleep(5)
M<<"[src] starts pummeling you"
sleep(1)
M << "You easily dodge [src]'s attack."
M.icon_state="kawarimi"
sleep(6)
src<<"[M] easliy dodges your attack."
M.icon_state=""
sleep(1)
src.doing=0
else
if(src.doing==0)
src.doing=1
src<<"You start pummeling [M]"
flick(pick("punch","kick"),usr)
sleep(5)
M<<"[src] starts pummeling you!"
M.hp -= damage
view() << "[src] attacks [M] for [damage] damage!"
src.doing=0
M.DeathCheck()


mob/proc/DeathCheck(mob/M)
if(M.client)
if(M.hp<=0)
M.locked=0
M.Levelsystem()
M.blood()
Move()
M.icon_state="tired"



runtime error: Cannot read null.client
proc name: DeathCheck (/mob/proc/DeathCheck)
usr: Aburame Propylparaben (/mob/male)
src: Aburame Propylparaben (/mob/male)
call stack:
Aburame Propylparaben (/mob/male): DeathCheck(null)
Aburame Propylparaben (/mob/male): Melee(the male (/mob/male))


Problem description:
The DeathCheck() gets a runtime, and i'm not sure why...
In your attack proc, call Deathcheck like this:

<code>src.Deathcheck(M)</code>
In response to Mega fart cannon
Err nope, not really because M is being damaged not src

M.deathproc(src)

Note though, if the M in deathproc is suppose to be the person who was damaged... than you gotta change the way it works (because it would be src not M >.>)
In response to Mega fart cannon
Thanks, it worked.
DeathCheck() is using its argument M wrong. src is the mob dying, not M. M is the killer, which was never actually passed to the proc when it was called. I'd advise changing the call for DeathCheck() to send the killer, even though you don't seem to need that right now.

Lummox JR