Page 1 of 1 1
Topic Options
#136392 - 2005-03-25 07:58 PM ok now I can't get a random number
Anonymous
Unregistered


SRND( @MSECS )
$listen = CStr(rnd(20)) + ".wav"
at (12,16) @MSECS

On my machine @MSECS *always* - 250 or 218
Which means my wav file will always be 0.wav

Harumph.

Top
#136393 - 2005-03-25 08:21 PM Re: ok now I can't get a random number
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
try using @ticks as the random seed.
Top
#136394 - 2005-03-30 10:22 AM Re: ok now I can't get a random number
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Also discard the first number returned by RND(). The first result may be less random than you'd expect, lol
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.048 seconds in which 0.021 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org