ID:144156
 
Code:
mob
proc
Deathcheck(mob/M)
if(M.hp<=0)
M.loc = locate(130,45,1)
M << "<font color=white>You died!"
M.hp = M.maxhp
src << "You killed [M]!"
M << "[src] killed you!"
if(M.Alignment_w == "Evil")
src.Alignment_n += 5
src.Alignmentcheck(src)
else
src.Alignment_n -= 5
src.Alignmentcheck(src)



Alignmentcheck()
if (src.Alignment_n <= -50)
src.Alignment_w = "Evil"
if (src.Alignment_n >= 50)
usr.Alignment_w = "Good"
if (src.Alignment_n >= -50 && src.Alignment_n <= 50)
src.Alignment_w = "Neutral"


Problem description:

Everytime I attempt to kill someone in the game I get an error message and once I remove the Alignmentcheck() proc it goes away there there anythign wrong with the Alignmentcheck() proc?
Could you try posting the error message, and what line it occurs on? You might need to turn on debug mode (in Dream Maker) before compiling the game, so that it gives you the line numbers.
In response to Jon88
the error is when it runs not when its compiled and I did add debug mode.

This is the error:

<font color = red>runtime error: Cannot read null.name
proc name: Deathcheck (/mob/proc/Deathcheck)
source file: Powers.dm,878
usr: Miran (/mob/cop)
src: Miran (/mob/cop)
call stack:
Miran (/mob/cop): Deathcheck(null)
Athame (/obj/Athame): Stab(null)</font>
The error is when it runs not when it compiles just incase you didnt know.
In response to Miran94
Your putting an argument in alignment check when it doesn't use one.
In response to Xx Dark Wizard xX
What do you meen
In response to Miran94
Miran (/mob/cop): Deathcheck(null)
Athame (/obj/Athame): Stab(null)

I think Deathcheck isn't recieving an argument..
In response to Kazekage
src.Alignmentcheck(src)

The proc doesn't take an argument.