ID:1953240
 
(See the best response by Zach Reznor.)
I've been testing a bit I already created a normal attack as verb worked normally but hit myself(using pixel) so i found out I should use outbounds or bounds and it giving me errors with "M" var (My intention is that M is any mob beside the usr) Any tips or help be much appreciated ^^

Better View: https://gyazo.com/897994f36e20a941b1aea197b608cc51


Code:
mob
proc
attack()
var x = 0 , y = 0
if(dir & NORTH) y+= 32
if(dir & SOUTH) y-= 32
if(dir & EAST) x+= 32
if(dir & WEST) x-= 32
for(var/mob/M in obounds(32))
var/damage = usr.Str - M.Def
flick("punch",src)
M.Health-= damage
view()<< "[usr] attacks [M] by <font color = red>[damage]</font color = red> damage!"
M:deathcheck()


Problem description:
Proc.dm:33:error: M.Health: undefined var
Proc.dm:34:error: M: undefined var
Proc.dm:35:error: M/:/deathcheck: undefined var
Proc.dm:31:error: M.Def: undefined var
Proc.dm:34:error: damage: compile failed (possible infinite cross-reference loop)
Downfall.dmb - 5 errors, 0 warnings (10/2/15 8:41 am)
Best response
var/damage = usr.Str - M.Def
view()<< "[usr] attacks [M] by [damage] damage!"
M:deathcheck()


All need an extra indent.
Yea your indenting is all bad also use the dm tag will make it easier for people to edit the code and help you out.
Thanks!! both of you!