![]() |
Random
Alright im just hoping someone here knows Visual Basic, anyways.
I know how to generate a random number 1-anything I want. But I forget how to create a random number anything-anything. I.E. 45-100 Int(Rnd * 10) That is the code to generate a number 1-10. And no Int(Rnd 45 * 100) Doesnt work.. |
blah = int(rnd(1)*x)+y
Y is the minimum number, and X is the maximum number minus Y. === So, for 45-100, the code is: blah = int(rnd(1)*55)+45 You're basically just generating a number from 0 to 55, and adding 45 to it... make sure to RANDOMIZE TIMER before it though.. |
Thanks dude.
|
All times are GMT -6. The time now is 07:58 PM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.