Can someone explain to me why the first example works fine but the second and third always give me the number 0? I tried with Kix 4.60 up until 4.67. All gave the same results.

What I would like to do is get a random(ish) number between 1 and 10 (1 and 10 included) so I thought using the @WDAYNO macro would be nice to use when seeding the random number generator. That did not work so I gave it a number and that also did not work. The only way to get it too work was by feeding it @TICKS. I guess somehow I am missing something.

I have to admit that this is the first time I’m using srnd() and rnd(). I never needed it before.

 Code:
Break on

?@KIX

SRnd(@TICKS)
$randomnumber = Rnd(10)
?$randomnumber

Sleep 5

 Code:
Break on

?@KIX
SRnd(@WDAYNO)
$randomnumber = Rnd(10)
? $randomnumber

Sleep 5

 Code:
Break on

?@KIX
SRnd(5)
$randomnumber = Rnd(10)
? $randomnumber

Sleep 5
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.