Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: random function? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 23 2008 at 15:04 | IP Logged Quote jeffw_00

hi again - is there any way to do a

WAIT (Random period of time between A and B seconds)

?
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 23 2008 at 18:36 | IP Logged Quote TonyNo

There is the rand(n) function, so you should be able to do a WAIT a + (rand(b - a + 1) - 1)...

Code:
SET SYSTEM LOCAL1 a
SET SYSTEM LOCAL2 b
WAIT [LOCAL2] + (rand( [LOCAL2] - [LOCAL1] + 1) - 1)
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 23 2008 at 18:46 | IP Logged Quote jeffw_00

thanks Tony
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum