Randomize without repeat
by Mike Gault on Nov 20, 2007 at 11:50:32 pm
I'm writing a 10 question trivia game. I'm have successfully written scripts for randomly selecting a question from 30 possibilities. What I want to do is prevent selecting the same question twice within a game. I have tried to set up a script using partitioned GPRMs to log which numbers have been selected. Then another script looks at those GPRMs and if the number has already come up, go back to the number generator script for another number. If it hasn't come up before, go to the question selected.
The result I'm getting is it goes into a loop... generating a number, logging it, looking at it and going back and generating another number. It never makes a question selection. Any thoughts? Or is there an easier way?