Posted By
|
Message
|
Matt K ( Kodex )
Registered 01/01/2003
Points 42
|
12th October, 2004 at 02:54:09 -
Hey guys,
First of all ill explain; im trying to make a peice of code which sets a counter to a random value between 0 and the current value of another counter.
The code im trying to use is 'random ( 0- value(Counter1))'.
I had hoped that would mean that the counter i applied this code to would be set to a random number between 0 and the value of my other counter.
If anyone can tell me why my code wont work and what i can do to correct it, it would be much apreciated.
Thanks,
Matt
n/a
|
Radix hot for teacher
Registered 01/10/2003
Points 3139
|
12th October, 2004 at 03:03:40 -
Try random(value(Counter1)+1)
n/a
|
David Newton (DavidN) Invisible
Registered 27/10/2002
Points 8322
|
12th October, 2004 at 03:48:44 -
Radix's line should do it - the random command produces a random whole number between 0 and (the number n - 1).
http://www.davidn.co.nr - Games, music, living in America
|
Matt K ( Kodex )
Registered 01/01/2003
Points 42
|
12th October, 2004 at 10:27:36 -
cheers guys, that's helped me a lot.
I love you ^__^
n/a
|
Radix hot for teacher
Registered 01/10/2003
Points 3139
|
12th October, 2004 at 11:39:44 -
I love me too.
n/a
|
|
|