View previous topic :: View next topic |
Author |
Message |
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Thu Jun 09, 2011 10:40 am Post subject: Random function not working |
|
|
Hi All
I have a script which has been compiled to a Novell file server. It contains
Code: |
%%random1 = @random(1,7)
|
I use this for load balancing the running of parts of the script by users.
The problem is the @random function is not working and is always generating 6.
Anyone know why this is happening?
Thanks
David... |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Thu Jun 09, 2011 11:33 am Post subject: |
|
|
You need to seed the random function.
Code: |
RANDOM @datetime(shn)
|
_________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Fri Jun 10, 2011 10:57 am Post subject: |
|
|
Yes seeding fixed the problem. Do you know why the @random() function
locked up? The compiled script is on a Novell server but is run over the
network on each PC.
Thanks
David
BTW. I used
Code: | @datetime(sn)@mod(@sysinfo(freemem),100) |
for the seed just to be different. |
|
Back to top |
|
|
|