View Single Post
Old 22nd September 2004, 22:27   #91
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)))):
Rand = Int((Dict1.Count + 1) * Rnd)
idxs = Split(itms(Rand), ":", -1, 1)
Rand2 = CInt(idxs(Int(ubound(idxs)+1 * Rnd)))

But I think the problem is here.

any idea ?

me and my beloved brain have found the answer :

I juste changed the brackets and +1 in the random

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

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