What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] Randomizing captions

[Question] Randomizing captions
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: [Question] Randomizing captions
The random element will be easy to code: just multiply the result of Math.random() by the length of the array. As for enuring no duplicates, try this:
1. Make a copy of the array, prefereably as a list or set.
2. Select an item from the copy at random.
3. use item.
4. Delete selected item from copy.
5. Repeat from 2.
[Image: spartaafk.png]
06-29-2006 09:39 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Question] Randomizing captions - by pollolibredegrasa on 06-29-2006 at 07:04 PM
RE: [Question] Randomizing captions - by RaceProUK on 06-29-2006 at 09:39 PM
RE: [Question] Randomizing captions - by pollolibredegrasa on 06-29-2006 at 10:57 PM
RE: [Question] Randomizing captions - by RaceProUK on 06-30-2006 at 11:49 AM
RE: [Question] Randomizing captions - by pollolibredegrasa on 06-30-2006 at 01:43 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On