I'm having this problem and I can't seem to find whats causing it.. its happening on this line. And I already have it defined at
mob/mon/var/hp = 0
---------------
error::expected a constant expression
hp = roll("2d4")
of course this is listed under the type of mob it is..
ID:175556
Apr 7 2003, 7:13 pm
|
|
In response to Lummox JR
|
|
Thanks Lumm... its simple matters like these that keep popping up to haunt me. But I see what needs to happen now. Thanks.
Lummox JR wrote: And you thought a proc call was a constant expression why, exactly? The value of roll("2d4") is different every time; it's not a constant value that can be calculated at compile-time. Hence the error. |
And you thought a proc call was a constant expression why, exactly? The value of roll("2d4") is different every time; it's not a constant value that can be calculated at compile-time. Hence the error.
Code like that belongs in New().
Lummox JR