Random task time
Hi
How i do random task time something like this PHP Code:
new const RANDOM_TASKTIME[][] = { 25, // first task time 15, // then this 40, // then this 150, // then this 12, // then this 2, // then this 150 // And start again 24 } thanking in advance. |
Re: Random task time
You don't need two [], just one, since one dimension.
Also make the value as float. Just use a var which will be incremented. set_task( RANDOM_TASKTIME[ myvar ], ... ); [...] myvar++; |
Re: Random task time
Quote:
You are pro man... :) |
Re: Random task time
wouldnt just this work?
set_task( RANDOM_TASKTIME[ myvar++ ], ... ); |
Re: Random task time
Yes, sure.
|
Re: Random task time
you can use the numbers in that form but use the set task function like this
PHP Code:
|
Re: Random task time
Quote:
|
Re: Random task time
I camed with the solution. maybe the coder is comfortable coding like this.
|
Re: Random task time
Quote:
|
Re: Random task time
Like this ?
PHP Code:
g_randomvar = 0 |
| All times are GMT -4. The time now is 23:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.