how do I choose a random quota_id from a set?
Using Jamroom
I'll read them to you, first mine:
Quote:
Store these items ( '7' and '7' and '6' ) in a box called $options.
Randomly select the position in the $options box. use that position to determine the item. Store the value of the item in $wanted. (now $wanted is either '7' or '7' or '6' ).
Give $wanted to {jrCore_list.....}
The second one, pauls one, reads:
Quote:
Choose a random number not lower than 6 and not higher than 8. If the random number turned out to be 8 then change it to 7. Store it in $weighted_quota_id. (now $weighted_quota_id is either '7' or '7' or '6' ).
Give $weighted_quota_id to {jrCore_list.....}
So both are ways to pick a random number. {jrCore_list} doesn't care which way you chose to select that number. It only cares that it gets a number.
--edit--
Paul chose to name his variable $weighted_quota_id, I chose to use $wanted. That name makes no difference and you can use whatever you like as long as no other location around there is using it.
updated by @michael: 12/06/14 11:24:50PM