prismite

Excluding like-results in loops

2 posts in this topic

Hi all!

Is there a way to utilize this kind of code, but make it so that if the program happens to land on a repeat number it ignores it and reselects?

For $n = 5 to 1 Step -1
   $RandomNumber = RANDOM (1,10,1)
      If $RandomNumber = 1 then FUNC1
      If $RandomNumber = 1 then FUNC2
      If $RandomNumber = 1 then FUNC3
      If $RandomNumber = 1 then FUNC4
      ...
Next

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now