ID:261693
 
When I attack a person, this happens.. The person gets a runtime error. I use a bump proc to do it.

runtime error: Cannot read 0.HP
proc name: Bump (/obj/battling/Axe/Bump)
usr: 0
src: Axe (/obj/battling/Axe)
call stack:
Axe (/obj/battling/Axe): Bump(Unknown Person (/mob))

Heres the attacking obj with the bump...

obj
battling
density = 1
icon= 'SpellIcons.dmi'
Axe
var/damage = 10
icon_state = "Soldier1"
Bump(atom/O)
if(istype(O,/mob))
usr.HP -= src.damage


Any help would be appreciated. Please tell me whats wrong..
Unknown Person wrote:
Any help would be appreciated. Please tell me whats wrong..

I already told you what's wrong; you're using usr in Bump(). At least you showed us the proc this time, but it was obvious from the error message: usr is 0, and it's trying to read 0.HP, so you've got "usr.HP" somewhere in your Bump() proc, where usr is inappropriate to use.

Lummox JR