proc/DeathCheck(mob/M as mob)
if(src.hp <= 0)
M <<"You killed [src]!"
M.exp += src.expgain
if(M.exp >= M.mexp)
M.level_check()
else
return
if(src.client)
src <<"[M] killed you!"
src.loc = locate(1,1,1)
src.hp = src.mhp
else
src <<"You have been killed by [M]!"
del(src)
Problem description:
well I'm not quite sure what the problem is but, the code works i still gain experience and level but this error pop up in game before the hollow dies.
runtime error: Cannot read null.exp
proc name: DeathCheck (/mob/proc/DeathCheck)
usr: Cross (/mob)
src: (NPC)Spider Hollow (/mob/hollows/Spider_Hollow)
call stack:
(NPC)Spider Hollow (/mob/hollows/Spider_Hollow): DeathCheck(null)
Cross (/mob): attack((NPC)Spider Hollow (/mob/hollows/Spider_Hollow))
if anyone could care to answer this or tell me what i would need to correct , it would be much appriciated thanks