mob
var
left_arm =0
right_arm = 0
torso = 0
legs = 0
stamina =100
HP=100
mob/verb
Straight(mob/m as mob in oview(1)) //attack a mob within 1 tile range
var/damage = prob(80)//damage from a scale from 1-80
oview() << "[usr] is attacking [m]!" //shows everyone but the player who the player is attacking
if(damage <= 30) //if damage is less than 30 attack misses
usr << "You missed."
else //otherwise subtract damage from mob/m's HP
m.HP -= damage
if(m.torso = 1) // if m's torso is targeted subtract from stamina instead
m.stamina -= damage
Problem description:
Combat.dm:22:error: : missing expression
The errors are still unfamiliar to me. Am I not supposed to do a second if, or is it the fact that I didn't define torso in the verb? If so why does it work for HP and stamina, but not torso? I've fiddled with the indention a few times, changed some things around, but the results have been pretty much the same.
if(m.torso=1)
should be