What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Random numbers, prevent from being used more than once

Random numbers, prevent from being used more than once
Author: Message:
stu
Junior Member
**

Avatar
Stu

Posts: 82
Reputation: 1
39 / Male / Flag
Joined: Sep 2004
O.P. RE: Random numbers, prevent from being used more than once
Ok, true enough, if I want to take the extra time to change that now, and each future one as I add it. I am just going to leave that for now though. As I said, I have now cut out the which statement alltogether, and am using just the Text array so its not a huge deal right now, to me..

I still cant get this to work though, when it calls the GetRandomLyric function,nothing seems to happen, and it just returns "undefined"..

Edit: Looks like I was missing a line of code, my bad.. testing it out now..

quote:
quote:
--------------------------------------------------------------------------------
Originally posted by CookieRevised
Actualy foaly's method is not going to work
--------------------------------------------------------------------------------


It works perfectly fine for generating the random number without repetition until 10 others have been selected.

I tried his method as well, but could not get that to work. If you think it can, that would be great if you could think of a way for me to figure it out, always better to know more than one method..
___________________________________________________________

Ok, so I got it to display a lyric. when the lyric is chosen, it is removed from the array, and added into arrPrevious (but it only seems to stay there for one lyric, see debuging). After 10 lyrics though, they dont get added back into the original array. Here is what the script debugger shows.. As you can see, my Text array consists of 12 Tests..
quote:
Started Personal Message
Printed personal message - Test 10
ArrPrevious - ,,,,,,,,Test 10
ArrLyrics - Test 1,Test 2,Test 3,Test 4,Test 5,Test 6,Test 7,Test 8,Test 9,Test 11,Test 12
Started Personal Message
Printed personal message - Test 8
ArrPrevious - ,,,,,,,,Test 8
ArrLyrics - Test 1,Test 2,Test 3,Test 4,Test 5,Test 6,Test 7,Test 9,Test 11,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 9
ArrPrevious - ,,,,,,,,Test 9
ArrLyrics - Test 1,Test 2,Test 3,Test 4,Test 5,Test 6,Test 7,Test 11,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 5
ArrPrevious - ,,,,,,,,Test 5
ArrLyrics - Test 1,Test 2,Test 3,Test 4,Test 6,Test 7,Test 11,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 11
ArrPrevious - ,,,,,,,,Test 11
ArrLyrics - Test 1,Test 2,Test 3,Test 4,Test 6,Test 7,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 2
ArrPrevious - ,,,,,,,,Test 2
ArrLyrics - Test 1,Test 3,Test 4,Test 6,Test 7,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 1
ArrPrevious - ,,,,,,,,Test 1
ArrLyrics - Test 3,Test 4,Test 6,Test 7,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 4
ArrPrevious - ,,,,,,,,Test 4
ArrLyrics - Test 3,Test 6,Test 7,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 7
ArrPrevious - ,,,,,,,,Test 7
ArrLyrics - Test 3,Test 6,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 3
ArrPrevious - ,,,,,,,,Test 3
ArrLyrics - Test 6,Test 12
Timer = 15000
Started Personal Message
Printed personal message - Test 12
ArrPrevious - ,,,,,,,,Test 12
ArrLyrics - Test 6
Timer = 15000
Started Personal Message
Printed personal message - Test 6
ArrPrevious - ,,,,,,,,Test 6
ArrLyrics -
Timer = 15000
Started Personal Message
Printed personal message -
ArrPrevious - ,,,,,,,,
ArrLyrics -
Timer = 15000

This post was edited on 07-05-2007 at 03:07 AM by stu.
07-05-2007 02:51 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Random numbers, prevent from being used more than once - by stu on 07-03-2007 at 10:14 PM
RE: Random numbers, prevent from being used more than once - by pollolibredegrasa on 07-03-2007 at 10:33 PM
RE: Random numbers, prevent from being used more than once - by foaly on 07-03-2007 at 10:34 PM
RE: Random numbers, prevent from being used more than once - by roflmao456 on 07-04-2007 at 03:15 AM
RE: Random numbers, prevent from being used more than once - by Volv on 07-04-2007 at 06:01 AM
RE: Random numbers, prevent from being used more than once - by markee on 07-04-2007 at 02:17 PM
RE: Random numbers, prevent from being used more than once - by Volv on 07-04-2007 at 02:31 PM
RE: Random numbers, prevent from being used more than once - by markee on 07-04-2007 at 02:35 PM
RE: Random numbers, prevent from being used more than once - by foaly on 07-04-2007 at 04:00 PM
RE: Random numbers, prevent from being used more than once - by stu on 07-04-2007 at 04:50 PM
RE: Random numbers, prevent from being used more than once - by roflmao456 on 07-04-2007 at 05:22 PM
RE: Random numbers, prevent from being used more than once - by Volv on 07-04-2007 at 05:47 PM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 12:34 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 12:51 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 12:55 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 01:03 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 01:32 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 01:55 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 02:00 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 02:18 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 02:32 AM
RE: Random numbers, prevent from being used more than once - by Volv on 07-05-2007 at 02:45 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 02:51 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 03:07 AM
RE: Random numbers, prevent from being used more than once - by Volv on 07-05-2007 at 03:11 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 03:22 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 03:36 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 03:45 AM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 03:47 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 03:55 AM
RE: RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 04:23 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 04:30 AM
RE: Random numbers, prevent from being used more than once - by foaly on 07-05-2007 at 10:57 AM
RE: Random numbers, prevent from being used more than once - by stu on 07-05-2007 at 04:59 PM
RE: Random numbers, prevent from being used more than once - by CookieRevised on 07-05-2007 at 11:39 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