Raised This Month: $ Target: $400
 0% 

[HELP] switch statement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 12-09-2011 , 13:55   [HELP] switch statement
Reply With Quote #1

please , how to use switch from 1 to 7 like 1,2,3,4,5,6,7
I know it should .. by default... but whan I use switch(1,7) or (1-7)
it doesnt work. most time it uses last number and repeat it *(7)

here I need to start each case from 1 to 7 every 12 secs

case 1 = 12 sec, than case 2 after next 12 sec
so when I use random_num it works like random..... but I need 1,2,3,4,5,6,7 in a row

PHP Code:
set_task(12.0,"start_task",_,_,_,"b")
       
}
public 
start_task() {  
              
         switch(
random_num(1,7))  
       {                                                       
           case 
1server_cmd("sq_server ^"123123123123^""
           case 
2server_cmd("sq_server ^"123123123123^"")  
           case 
3:server_cmd("sq_server ^"123123123123^"")                             
           case 
4:server_cmd("sq_server ^"123123123123^"")   
           case 
5:server_cmd("sq_server ^"123123123123^""
           case 
6:server_cmd("sq_server ^"123123123123^""
           case 
7:server_cmd("sq_server ^"123123123123^"")
      }      
    

__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 12-09-2011 at 13:57.
avril-lavigne is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode