Randomly draw from a list and remove name drawn

So I have a game we play in our bowling league called strike challenge. basically you buy tickets for $2 a piece as many as you want. we then draw a ticket out of a bucket and if that person strikes they get the pot. if they miss we draw another name but now that first name has one less ticket in the bucket.

I am working on making a digital version for this. so the entry names and number of entries are stored in DBStrike, so they can be displayed alphabetically. When pick winner is selected it creates a list that puts each name on the list as many times as entries they have(DBWinners). I am doing it this way to avoid having to program probabilities and all that since I'm very new to programing. The issue I am having is that what i set up works but does not remove the selected winner from the list.

example:
john has 4 entries
joe has 2 entries
jim has 5 entries
this creates a list with [jim, jim, jim, jim, jim, joe, joe, john, john, john, john] in DBWinners
then selects randomly one of the names - jim
it should then have one less jim in the list, but that's where it breaks. It still shows me that jim has 5 entries even after being picked

after picking the random item from the list add these blocks:


first get the index of one of these jims
and if the index is not 0, then remove that jim from the list

Taifun

Thanks for the reply. This didnt get the result i desired but a friend of mine was able to figure out how to fix it in the end.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.