Fixes runtime error: pick() from empty list

This commit is contained in:
Ravensdale
2015-01-13 13:37:07 -08:00
parent 759373ac0a
commit 1bd1687c81
+5 -1
View File
@@ -46,7 +46,11 @@
playsound(loc, hitsound, 50, 1, -1)
return hit
else
user.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src] by [user]!</span>")
if(attack_verb.len)
user.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src] by [user]!</span>")
else
user.visible_message("<span class='danger'>[M] has been attacked with [src] by [user]!</span>")
if (hitsound)
playsound(loc, hitsound, 50, 1, -1)
switch(damtype)