ID:145466
 
Code:
    code removed


Problem description:
Ok well I do know what the problem is but I dont know how to fix it. Its the typical calling usr inside a proc problem. But I dont understand how I can get to the person who shot the projectile. C an someone Help me? BTW.. I was trying attack mob/You. Just need to know how I can re refrence my orginal shooter from within the CharacterDeath() proc.

Heres the error message:

runtime error: Cannot read 0.exp
proc name: characterdeath (/mob/proc/characterdeath)
usr: 0
src: You (/mob/You)
call stack:
You (/mob/You): characterdeath()
Ki Blast (/obj/projectile/wki): Bump(You (/mob/You))
Ki Blast (/obj/projectile/wki): missileloop()
Ki Blast (/obj/projectile/wki): missileloop()

Use src for the person who has fired the projectile and have


characterdeath(mob/M)

for the person who is to die


never use user in procs.... filthy zeta coding
In response to A.T.H.K
A.T.H.K wrote:
Use src for the person who has fired the projectile and have


characterdeath(mob/M)

for the person who is to die

Exactly wrong. In a death check, src must always be the victim. The argument should be the killer.

Lummox JR
In response to Lummox JR
It works either way mob/M is how i do my victem


src.Deathcheck(M)
In response to A.T.H.K
A.T.H.K wrote:
It works either way mob/M is how i do my victem

src.Deathcheck(M)

Well it may work, but that's not the point. The point is, it's wrong. src needs to be the victim because that's what the whole proc revolves around: the mob who's dying.

Lummox JR
In response to Lummox JR
Well uhh.. whats the proper way to do it? I have src set to the victim but how to I refrence to the person who shot the projectile and not the projectile itself?
In response to X0Gohan0X
I got it working.. You guys werent much help but thanks anyway.