ID:143146
 
Code:Its part of the code for a spell(Projectile)
    Incendio
icon = 'Spells.dmi'
icon_state = "Incendio"
density=1
var/player=0
Bump(mob/M)
if(istype(M))
src.owner<<"Your [src] hit [M] for 15 damage!"
M.hp-=15
Dcheck(M)
del src
else
del src


mob
proc/Dcheck(mob/M) //Death Check
if(M.hp <= 0) //If M's hp is less that or equal to 0
M<<"You died!" //tell M they died
M.hp = M.maxhp //Make M's health be 50
M.loc = locate(4,4,2) //Start M at 1,1,1
if(M.player == 0)
del(M)


Problem description:Obj.dm:86:error:Dcheck:undefined proc
Obj.dm:102:error:Dcheck:undefined proc

I dont know whats wrong with that
 Incendio
icon = 'Spells.dmi'
icon_state = "Incendio"
density=1
var/player=0
Bump(mob/M)
if(!(ismob(M)))return ..() // returns to the default procedure
src.owner<<"Your [src] hit [M] for 15 damage!"
M.hp-=15
M.Dcheck(src.owner) // M is the person being killed, and src is the killer
del src



mob
proc/Dcheck(mob/killer) //Dcheck should be called with the KILLER as a refrence, not the killed
if(hp <= 0)
src<<"You died!"
world<<"<b>[name] has died by the hands of [M.name]!</b>" //displays to the world that the killed has died by the killer
hp = maxhp
loc = locate(4,4,2)
if(!player) // look up boolean variables in the DM refrence, which can be found by pressing F1 when Dream Maker is open
del(M)


remember that src is the object in this case, so there wasn't a proc called Dcheck under the obj type path(i'm assuming it was that) so i changed it around. It should work(Indentation may be messed up)
In response to Axerob
Obj.dm:83:error:src.owner:undefined var
Obj.dm:85:error:src.owner:undefined var
Obj.dm:99:error:src.owner:undefined var
Obj.dm:101:error:src.owner:undefined var

How do i Define the var i thought that was meant to be built in
In response to Chrislee123
obj
projectile
var
owner

// when it's called
var/obj/projectile/D=new()
D.owner=src
In response to Axerob
obj
projectile
var
owner
var/obj/projectile/D=new()
D.owner=src



Is that it? I thought it would be alot more
In response to Chrislee123
no, its just var/owner


When it's CREATED(like in a verb then you use the code below it)
In response to Axerob
Ty uve helped me improve my coding and knowledge about vars