Code:
verb/Write_in_Notebook()
set category = "Fighting"
var/T = input("Who's name would you like to write down?")
if(!T)return
for(var/mob/M in world)
var/mob/M
if(T=="[M]")
var/deathreason=input("How would you like to kill [M]?")
usr<<"You have 40 seconds until [M] is judged."
view(8)<<"<font color=red><b>[usr] scribbles something in a strange notebook."
spawn(400)
M.hp-=M.maxhp+1
if(M.client)
M.DeathCheck()
if(M.dead==1)
world<<"<b><font size=2><font color = red>[M] has been killed [deathreason]."
M.Respawn()
else if(M.hp<=0)
usr.exp+=M.level*5
usr.yen+=M.level*5
else
view(8)<<"<font color=red><b>[usr] scribbles something in a strange notebook."
sleep(400)
usr<<"40 seconds pass as you wonder why nobody has died yet."
Problem description:
It won't kill anybody. No matter what you write down in the notebook, it just goes to the last line saying 40 seconds pass. I don't know what I'm doing wrong, and any help would be much appreciated. <3