mob
proc
BDMG()
var/M = for(var/mob/M in view())
usr.powerlevel -= M.powerlevel
M.Death()
Problem description:Trying to define M so i can use it in my beam code...
Please help these are the errors:
Damage.dm:16:error:var/mob/M:undefined var
Damage.dm:16:error:for:undefined proc
Damage.dm:17:error:M.powerlevel:undefined var
Damage.dm:18:error:M.Death:undefined proc
Damage.dm:16:M :warning: variable defined but not used
What exactly is the beam supposed to do? Hurt everyone in view? Let you select the person to shoot? A little more info helps. But this line..
Appears to be your problem. Also, you shouldn't put usr in a proc, you should use src.
usr.powerlevel-=M.powerlevel//usr should be src
On another note.. Did you mean for the person who uses the blast to have his powerlevel subtracted by the powerlevel of the person getting hit by the blast, and then to kill the person getting hit by the blast? =/ Kind of a funny system.