mob/proc/Blast1(mob/M as mob) //removed most of the animation code...
if(usr.mp>=5)
var/damage=10*usr.level
M.hp -= damage
usr.mp-=5
npcdeathcheck(M)
else
usr<<"<B>You don't have enough MP !</B>"
mob/proc
npcdeathcheck(mob/P as mob, mob/M as mob)
if (M.hp <= 0)
P << "You have killed the [M]!"
P.exp += M.expreward
endbattle(P)
del (M)
else
npcattack1(P, M)
Now, after casting the spell, it's shows some errors such as:
runtime error: Cannot read null.hp.
proc name: npcdeathcheck
Any ideas ?
THX.