|
-
[MX] Generating random numbers
Hi,
I want to generate random numbers between 1 to 10. I have successfully written script for that. Now, the problem is bcuz it is random it might generate the same number again. I want to eliminate that. I have a vague idea that I will have to store each generated number in an array (using push method) and then every time a number is generated, will have to ask flash if the same exists as an element of the array. If it does, skip and generate again. This way it should generate only 10 numbers, all different, and then stop.
However, m not able to put this through. Any help would be appreciated.
Regards.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|