proc
Beam(mob/M)
var/obj/Head = new/obj/Beams/Head()
if(usr.dir == NORTH)
Head.loc = locate(usr.x,usr.y+1,usr.z)
if(usr.dir == SOUTH)
Head.loc = locate(usr.x,usr.y-1,usr.z)
if(usr.dir == WEST)
Head.loc = locate(usr.x-1,usr.y,usr.z)
if(usr.dir == EAST)
Head.loc = locate(usr.x+1,usr.y,usr.z)
Head.total = 15
Head.dir = usr.dir
Head.owner = usr
M.powerlevel -= usr.powerlevel
M.Death()
Problem description:
When i run my game and test the beam system it works but red text errors appear.(shown below)
runtime error: Cannot read null.powerlevel
proc name: Beam (/mob/proc/Beam)
source file: Beam.dm,116
usr: Fire Dynasty (/mob/Saiyan)
src: Fire Dynasty (/mob/Saiyan)
call stack:
Fire Dynasty (/mob/Saiyan): Beam(null)
Fire Dynasty (/mob/Saiyan): Fire()
Its a non homing beam system and i want it to damage people that get in the beams way.
Thanks