ID:145995
 
Code:
mob
proc
Deathcheck(mob/M) //Special deathcheck, allows for repop\
extra argument is to show who killed who

if(M.hp <= 0) //check the HP again
view()<<"[M.name] dies at the hands of [src.name]!"
src.exp+=(M.maxexp/2)
//Tells you who has died and who te killer was
M.deaths ++//Add one to M's death varble
if(M.client)
if(M.alignment = "Heavenly")
M.Move(locate(25,25,2))
M.hp = M.maxhp
M.mana = M.maxmana
M.energy = 100
M.overlays += /obj/angelwings
if(M.alignment = "Neutral")
M.Move(locate(25,25,3))
M.hp = M.maxhp
M.mana = M.maxmana
M.energy = 100
M.overlays += /obj/halo
if(M.alignment = "Chaotic")
M.Move(locate(25,25,4))
M.hp = M.maxhp
M.mana = M.maxmana
M.energy = 100
M.overlays += /obj/demonwings
else //If not, delete M and wait 2 seconds to repop the world
del(M)
spawn(rand(200,300)) world.Repop()


Problem description: Mob.dm:166:error::missing expression
Mob.dm:172:error::missing expression
Mob.dm:178:error::missing expression

Problem: if(M.alignment= "*") lines... Tryed around 250 things, still doesn't work


You need to use two equal signs.
In response to Blakdragon77
Blakdragon77 wrote:
You need to use two equal signs.
...?
In response to Mysame
                    if(M.alignment == "Heavenly")
In response to Blakdragon77
DOH! Can't believe I missed that one!!! Thanks!!
As I mentioned before, your DeathCheck() proc is entirely backwards. src is supposed to be the mob dying, and the argument (in this case M) is the killer.

Look at how many times you're using M.something in this proc. It should be crystal clear from that that this proc should belong to the victim, not the killer.

Lummox JR