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
Sleinth :(
ID:147339
Jun 27 2004, 6:29 pm
|
|
Jun 27 2004, 6:32 pm
|
|
What's the code where you get these 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. |
In response to Sleinth
|
|
What's this src.TATK stuff?!
|
In response to AZA
|
|
its the variables for the rand proc
|
In response to Sleinth
|
|
proc/Damage(mob/M) 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. |
In response to Theodis
|
|
Thanks Theodis.
|
In response to Theodis
|
|
a tip is to highlight all of under the if() statement, hold shift, and press tab. =D
|