my attacking verb has an error on it.
here's the verb
obj/Skills/Attack
icon = 'HUDPanel.dmi'
icon_state = "Punch"
Click()
set category = null
var/DAMAGE = usr.PSTR
for(var/mob/M in oview(1))
if(M.NPC == "false")
usr << "You attacked [M] for [DAMAGE] damage!"
M << "[M] attacked you for [DAMAGE] damage!"
M.PL -= DAMAGE
M.DEATHCHECK()
else
usr << "You can't attack a Non-Player Character!"
i made it an obj so that its clickable to attack.
the ingame error messege is this below
runtime error: type mismatch
proc name: Click (/obj/Skills/Attack/Click)
Dark Legend attacked you for 2 damage!
Dark Legend is me and when someone attack me, it says that i attacked myself.
ID:147861
![]() Oct 25 2003, 10:48 am (Edited on Oct 25 2003, 11:16 am)
|
|
You had M there instead of usr.
I can't be sure about this without a line number (go Options->Preferences and turn on debug mode to display line numbers); but check to make sure that usr.PSTR and M.PL are both numbers.