my rand() proc has an error and I can seem to figure out whats wrong any help would be nice the errors are:
Dead World.dm:138:rand:undefined proc
Dead World.dm:139::invalid expression
proc/Damage(mob/M)
var/hit = roll(1,20)
var/dodge = roll(1,20)
var/damage = rand(src.TATK_minimum,src.TATK_maximum)
if (M.newbie == 1)
if (istype(M,/mob/races))
src << "They are a newbie and cant be attacked!."
return
Thats the part with the errors.
proc/Damage(mob/M)
var/hit = roll(1,20)
var/dodge = roll(1,20)
var/damage = rand(src.TATK_minimum,src.TATK_maximum)
if (M.newbie == 1)
if (istype(M,/mob/races))
src << "They are a newbie and cant be attacked!."
return
Thats the part with the errors.
Well I tested the source code myself and BYOND just seems to be giving a weird error. Your only problem is that you have the indentation messed up and you need to remove one tab for the if statement and everything after it.