ID:148678
 
Though It doesn't say I have an error, this code won't work in the game. When I click Punch, it won't flick the Punch icon state. Could someone please help me!

mob
verb
Punch(mob/M in oview (1) , mob/monster in oview(1) , mob/src in oview(1))
set category = "Attacks"
if(usr.stam <= 0.5)
usr << "Beads of sweat rolls down your face!"
if(usr.stam >= 0.5)
if(istype(src, /mob/pbag/pbag1))
flick("punch",usr)
new /mob/pbag/pbag1
usr.exp += 2
usr.maxPL += 1
usr.str += 1
usr.def += 1
usr.maxHP += 0.05
if(istype(src, /mob/pbag/pbag2))
flick("punch",usr)
new /mob/pbag/pbag2
usr.exp += 2
usr.maxPL += 1
usr.str += 1
usr.def += 1
usr.maxHP += 0.05
if(istype(src, /mob/pbag/pbag4))
flick("punch",usr)
new /mob/pbag/pbag4
usr.exp += 4
usr.maxPL += 3
usr.str += 2
usr.def += 2
usr.maxHP += 0.05
if(istype(src, /mob/pbag/pbag3))
flick("punch",usr)
new /mob/pbag/pbag3
usr.exp += 4
usr.maxPL += 3
usr.str += 2
usr.def += 2
usr.maxHP += 0.05
if(usr.str - M.def > 0)
flick("punch",usr)
M.HP -= usr.str - M.def
usr.stam -= 1
M.DeathCheck()
Well, offhand, you may want to add a sleep() proc after the flick equal to the number of frames in the animation. What's probably happening is that it's flicking too fast for you to see.

~X
Your problem is that src is not /mob/pbag/whatever. src is not a valid name for a variable (last time I checked).