View Single Post
Old 22nd September 2004, 21:27   #91
neFAST
Member
 
Join Date: Sep 2004
Location: Montreal
Posts: 56
Send a message via ICQ to neFAST
I'm still a little off-topic but I just want to say that the rand Items plugin always insert the 2nd song of an album !

I don't really understand the last line of the code (CInt(idxs(Int(ubound(idxs)+1 * Rnd)))):
code:
Rand = Int((Dict1.Count + 1) * Rnd)
idxs = Split(itms(Rand), ":", -1, 1)
Rand2 = CInt(idxs(Int(ubound(idxs)+1 * Rnd)))
mlq(Rand2).enqueue


But I think the problem is here.

any idea ?

[edit]
me and my beloved brain have found the answer :

I juste changed the brackets and +1 in the random
code:

Rand = Int(Dict1.Count*Rnd+1)
idxs = Split(itms(Rand), ":")
Rand2 = Int(idxs(Int(ubound(idxs)*Rnd+1)))
mlq(Rand2).enqueue


Last edited by neFAST; 22nd September 2004 at 22:08.
neFAST is offline   Reply With Quote