ID:139448
 
Code:
Code.dm:13446:error: M.deathcheck: undefined proc
Code.dm:13448:error: M.Wdeathcheck: undefined proc

Errors are here:
        Bump(mob/M)
..()
var/mob/P = src
if(istype(M,/mob/Pokemon))
if(M == owner||M.owner == P.owner||Wfight==0||fighting)
return
else
var/Damage = P.str
M.hp -= Damage

view() << "[src] attacks [M] for [Damage]!"
if(P.owned==1)
M.deathcheck()
else
M.Wdeathcheck()



src.fighting = 1
sleep(5)
src.fighting = 0

The procs:
mob/Pokemon/proc/deathcheck(mob/M as mob)
if(!M) return

mob/Wild_Pokemon/proc/Wdeathcheck(mob/M)
if(src.hp<=0)
oview(12) << "[src] fainted!"
del(M)
mob/Pokemon/deathcheck(mob/M)
if(src.hp <=0)
src.happiness-=5
src.fainted=1
oview(12) <<"[src] fainted!"
src.returning(src.owner)
usr.PkmInInven+=1


Problem description:
The procs are defined, but dream maker says they are not.
I've been working on it for a day, and still can't get them fixed =O.
For the deathcheck proc try just mob/M in stead of mob/M as mob.
Those procs are defined under mob/Pokemon, you're calling them as mob.

if(istype(M,/mob/Pokemon))
var/mob/Pokemon/X = M
X.DeathCheck()
In response to Iocamus
Iocamus wrote:
For the deathcheck proc try just mob/M in stead of mob/M as mob.
Didn't work. Thanks though.
In response to Emasym
Emasym wrote:
Those procs are defined under mob/Pokemon, you're calling them as mob.

> if(istype(M,/mob/Pokemon))
> var/mob/Pokemon/X = M
> X.DeathCheck()

One error is removed by that, still this one here though:
Code.dm:13449:error: X.Wdeathcheck: undefined proc
In response to Raimo
Okay, I fixed the last error. Thanks both of you for helping me ^^.
In response to Raimo
var/mob/Wild_Pokemon/W = M
W.WdeathCheck()

Since the proc is under the "/mob/Wild_Pokemon/" type it needs to be defined to suit that. But you could always make a wild variable and make that a regular Pokemon proc.
In response to Emasym
use a colon in place of the period

M:DeathCheck()

X:DeathCheck()
In response to Yusuke13
And why would I? As far as I remember, the : operator is barely used.
In response to Yusuke13
Do not give horrible advice to people, please.
In response to Yusuke13
Yusuke13 wrote:
use a colon in place of the period

M:DeathCheck()

X:DeathCheck()

No.
In response to Yusuke13
Of course, the guy with the Dragonball Z Byond icon says it...
In response to OrangeWeapons
Hey! That's generalisation and prejudice!
In response to Emasym
Naah, thats called -truth-.
In response to Yusuke13
Why would you want to do that? You should read this.
In response to Darker Legends
Because this operator doesn't check the var's type, the difference between using this instead of the . operator is that the latter is likely to result in a compiler error instead of a runtime error if you make a mistake. It's a lot better to have your errors at the compiler end so you can deal with them there.