I want my code to use this:
damage = rand(x,y)
But it returns an error with something about a constant expression like this:
=: expected constant expression
Any help?
ID:143213
Nov 18 2007, 11:53 am
|
|
Nov 18 2007, 11:55 am
|
|
You have to be doing that within a proc (or a verb, but those are also procs). Whenever you want a new value for damage (generally: when you're attacking), you just have to use damage = rand(x,y). Note that this means that damage doesn't actually have to be a variable declared under mob/variable, and can just be declared in the proc when you use it.
|
In response to Garthor
|
|
Thanks, it works perfectly now.
|