Raised This Month: $ Target: $400
 0% 

case problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
manfailui
Member
Join Date: Jun 2012
Location: Hong Kong
Old 01-11-2013 , 10:15   case problem
Reply With Quote #1

if i want case 1 to case 10 = user_kill(id)
Can be written this
case 1:
{
user_kill(id)
}
case 2:
{
user_kill(id)
}
case 3 .....

but it is Inefficiency
teach me how to write better..thank you
__________________
I Come from Hong Kong.
my English is very poor

Last edited by manfailui; 01-11-2013 at 10:15.
manfailui is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 01-11-2013 , 10:24   Re: case problem
Reply With Quote #2

PHP Code:
switch(id)
 {
     case 
1..10
    {
     
server_print("test");
    }
 } 
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT

Last edited by AngeIII; 01-11-2013 at 10:24.
AngeIII is offline
Send a message via Skype™ to AngeIII
manfailui
Member
Join Date: Jun 2012
Location: Hong Kong
Old 01-11-2013 , 10:26   Re: case problem
Reply With Quote #3

Quote:
Originally Posted by AngeIII View Post
PHP Code:
switch(id)
 {
     case 
1..10
    {
     
server_print("test");
    }
 } 
thank you
__________________
I Come from Hong Kong.
my English is very poor
manfailui is offline
Reply



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 13:38.


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