Jump to content
UBot Underground

"Random List Item" not rerandomizing in a loop


Recommended Posts

I am using a "random list item" in a loop but I keep getting the same item in the list everytime.

I also tried using random(0,list total) for trying to get a specific item but still no go.

post-1278-1283895912419_thumb.jpg

Is this a bug?

 

p.s.: If you see a broken image link then please click on it and you will see it.

Link to post
Share on other sites

I am using a "random list item" in a loop but I keep getting the same item in the list every time.

I also tried using random(0,list total) for trying to get a specific item but still no go.

 

Is this a bug?

 

 

If you're trying to get a specific item then use next list item or list item with a set list postion set to 0.

 

But random list item seems to be working fine. If it giving you the same item over and over with no change at all? Or is it bringing up the list item too often?

Link to post
Share on other sites

IT is giving me the same item over and over again.

 

I am calling it from another script though (so in another tab).

I think I will use next list for now and rotate through it.

Link to post
Share on other sites

lol no biggie.

 

 

actually there is a funkier way I've done this with a random list item.

 

Basically you set a variable to the random item in the list.

You use that list item.

You then remove that list item.

You then save the remaining list to a new list.

You then read the least.

And then you loop it back.

 

What you end up with is a list of items that diminishes, saves, reads, and loops in random.

 

And you get the guarantee that you will exhaust completely the list in a random fashion.

 

Otherwise you could get the same list item twice.

 

:)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...