ID:264036
 
Code:runtime error: Cannot read null.HP
proc name: DeathCheck (/mob/proc/DeathCheck)
usr: whatever (/mob)
src: whatever (/mob)
call stack:
whatever (/mob): DeathCheck(null)
whatever (/mob): attack(Ivysaur (/mob/Ivysaur))



Problem description:OMG!! It won't work, Can someone please help me? It says this whenever i attack ANY creature, not just Ivysaur?

We can't help you without code. We are not telepaths or people with remote access to your PC.
In response to Popisfizzy
Sorry, i'm a noob, but.... I fixed it!!
Thnx anyway Popisfizzy
In response to Popisfizzy
Sure we can. The error message is pretty damn clear: he's not providing an argument to DeathCheck().

The DeathCheck() is also written backwards: src should be the mob that is being attacked, while the argument should be the attacker. He has it the other way around, which just makes things more complicated.
In response to Garthor
Garthor wrote:
He has it the other way around, which just makes things more complicated.

Which is exactly why I had assumed we couldn't help him without the code.
In response to Popisfizzy
Well, you'd have to be really silly to do something like:

del(M)
if(M.HP < 0)
//...


so I'd rule that out.

Then again...
In response to Garthor
Actually, you know what? Ignore everything I said in this thread, 'cause I had a major eff-up in my thought process when I read that runtime. -_-
In response to Garthor
Garthor wrote:
Well, you'd have to be really silly to do something like:

del(M)
> if(M.HP < 0)
> //...

so I'd rule that out.

Then again...

Look, I may be a noob, but not that much...