ID:144758
 
Code:
mob/var/Ammo=15
mob/var/Health=100

obj/bullet
icon='bullet.dmi'
icon_state="bullet"
density=1
Bump(mob/M)
if(istype(M,/mob))
var/obj/bullet/T
M.Health-=5
del T
usr.Death()
else
..()

mob/proc
Death()
if(src.Health<=0)
view() << "[src] died!"
src.loc=locate(20,27,1)
src.Health = 100
src.kills-=1
src.deaths+=1
src.Kills()


var/bullet/B

obj
Weapon
Gun
icon = 'weapon.dmi'
icon_state = "gun"
verb
Shoot()
if(usr.wequipt)
if(usr.Ammo<=0)
usr<<"You dont have enough ammo!"
else
usr<<sound('gunshot.wav')
usr.Ammo-=1
var/obj/bullet/B=new(usr.loc)
walk(B,usr.dir)
sleep(10)
del B
else
usr<<"You need to turn on your gun!"




Problem description:When you shoot people, I get runtime errors and I don't die. Whats wrong?

it would be helpful if you pasted the error, chances are why you won't die is related to that


btw:
            var/obj/bullet/T
M.Health-=5
del T
usr.Death()

T is useless, it's not defined...
and who is "usr"? You want M.Death()

- GhostAnime
In response to GhostAnime
Thank's for the help.