mob/var/KOed = 0
proc
KOcheck(mob/M)
if(M.health<=0)
M.canmove=0
M.KOed=1
view(6)<<"[M] has been knocked out."
sleep(60)
if(M.NPC==0)
M.canmove=1
M.KOed=0
var/half = M.maxhealth/2
M.health = half
mob/verb/Finish(mob/M in oview(1))
set category = "Combat"
if(M.KOed==1)
if(M.NPC==1)
del M
else
M.loc=locate(10,10,1)
M.deaths+=1
world<<"<b>[src] has killed [M].</b>"
Finaldeathcheck(M)
Problem description:
So I tested out the "Finish" on one of my NPCs, and it worked, but a few seconds later I got this runtime error:
runtime error: Cannot read null.NPC
proc name: KOcheck (/proc/KOcheck)
usr: Div (/mob)
src: null
call stack:
KOcheck(null)
Div (/mob): Attack(null)
it might be something as simple as maybe youve defined npc under the npc class only, but you need to put it like this