mobproc/Deathcheck()if(src.HP <= 0) src.loc = locate(32,31,6) src << "You were killed by [killedby], and you are now a ghost.You will be a ghost for 5 minutes, then wake up in the hospital wing." killedby << "You killed [src]!" killedby.XP += src.lvl + 10 src.XP -= 2 sleep(30) src.HP = src.MaxHP

Problem description:
This is under construction, so don't worry about the user not being a ghost. The problem is that it says killedby.XP is not defined, but there is a var called killedby and there is a var called XP.

mobproc/Deathcheck(mob/killedby)if(src.HP <= 0) src.loc = locate(32,31,6) src << "You were killed by [killedby], and you are now a ghost.You will be a ghost for 5 minutes, then wake up in the hospital wing." killedby << "You killed [src]!" killedby.XP += src.lvl sleep(30) src.HP = src.MaxHP

You are passing null. Of course it's going to say null.XP. That's what you're telling it to do. Computers are 'dumb.' They only do what you tell them to. Nothing more. Nothing less.

Also, do yourself a favor and just define the Bump proc with a /mob as the type of the first argument instead of using the colon everywhere. (You still need the ismob() check, but using colons where you really don't need them just shows a lack of skill.)