random_num
Hello,
I was wondering is there any known bugs with using random_num ? had set it to random_num( 2, 12) yet sometimes 20 comes up. :S If there are known problems how about alternatives? random_float wont work, however it is used on another part of the code which is unrelated. Ty! |
Re: random_num
Can you show that part of the code that you uses random_num?
|
Re: random_num
Certainly
PHP Code:
|
Re: random_num
PHP Code:
PHP Code:
PHP Code:
|
Re: random_num
Quote:
Code:
Code:
Done. 2147483647 loops, 0 problems occurred and it all took 3 minutes, 22 seconds and 152 milliseconds. |
Re: random_num
I don't know of any bugs with random_num(). Why do you think it is giving you 20? If I had to guess, you don't know what the % operator does.
|
Re: random_num
Ty! Black Rose for testing.
Quote:
How can I make it work so that it takes a deathshot randomly between 2 - 12? It doesn't have to be specifically between these two numbers as long as it randomly gets taken within the first couple of deaths. |
Re: random_num
Quote:
|
Re: random_num
I will read that.
Do you know why it sometimes takes a deathshot at 20 deaths? It happened 3 times however am unable to reproduce this situation. |
Re: random_num
Oke after reading I understand the code a lot better.
Decided to go with PHP Code:
Nomatter for how long it could tackle on at 12 deaths it is certain there will be a deathshot. |
| All times are GMT -4. The time now is 05:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.