proc
Death(mob/M as mob) //Named deathcheck, and when I put M in the coding for this proc, it will mean the mob (not src, but other mob)
if(istype(M,/mob/Player)) //If the mobs type is that of /mob/PC
M.PCDeath() //Then do the PCDeathCheck on it
else
if( M.Life <= 0) //if its HP is less than or equal to 0...
usr.exp +=src.exp_give
Levelup()
del(M) //Delete the mob
PCDeath(mob/M)
if(M.Life <= 0)
view(M) << "<font color=white><b>[src] has been killed."
M.loc = locate(3,2,1) //Move it to the starting point
M.Life = MaxLife //Refill the PC's HP
To me it seems that it would work but when the monster thats dieing's Life goes to 0 it doesn't delete it
runtime error: Cannot read null.Life
proc name: Death (/mob/proc/Death)
source file: Procs.dm,124
usr: Slime (/mob/Monster/Slime)
src: Emperor Beld (/mob/Player)
call stack:
Emperor Beld (/mob/Player): Death(null)
Slime (/mob/Monster/Slime): MonAttack(Emperor Beld (/mob/Player))
Slime (/mob/Monster/Slime): Bump(Emperor Beld (/mob/Player))
it gives that error can anyone tell me whats wrong?