Raised This Month: $ Target: $400
 0% 

Duda switch's


  
 
 
Thread Tools Display Modes
Author Message
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-22-2011 , 14:27   Duda switch's
#1

No me acuerdo como poner varias opciones por las que se puede llamar a un case. Por ejemplo:

PHP Code:
new num 100
switch(num)
{
    case 
100client_print(0"1")
    case 
200client_print(0"1")
    case 
300client_print(0"1")
}

// Esto mismo pero todo en un solo case. 
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Nico1
Senior Member
Join Date: Oct 2010
Old 12-22-2011 , 15:04   Re: Duda switch's
#2

seria algo asi
PHP Code:
new num 100
switch(num)
{
        case 
100..300client_print(0,print_center,"1"// aca va desde el 100 hasta el 300

:B
__________________

Last edited by Nico1; 12-22-2011 at 15:06.
Nico1 is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 12-22-2011 , 15:23   Re: Duda switch's
#3

PHP Code:
switch(hola)
{
    case 
123hola()


Last edited by Stereo; 12-22-2011 at 15:23.
Stereo is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 12-22-2011 , 15:37   Re: Duda switch's
#4

Quote:
Originally Posted by Nico1 View Post
seria algo asi
PHP Code:
new num 100
switch(num)
{
        case 
100..300client_print(0,print_center,"1"// aca va desde el 100 hasta el 300

:B
Con eso haces que si el numero esta entre 100 o 300 sale un 1.
Quote:
Originally Posted by Stereo View Post
PHP Code:
switch(hola)
{
    case 
123hola()

Aca dice que solamente en los numeros 1 , 2 y 3 se va a llamar hola.

Solo lo explico xd
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-22-2011 , 19:19   Re: Duda switch's
#5

Quote:
Originally Posted by Nico1 View Post
seria algo asi
PHP Code:
 new num 100 switch(num) {      case 100..300client_print(0,print_center,"1"// aca va desde el 100 hasta el 300 } 
:B
Esto toma como válidos los valores entre 100 y 300. Lo que necesitaba era esto:
Quote:
Originally Posted by Stereo View Post
PHP Code:
switch(hola) {       case 123hola() } 
Gracias Stereo Y gracias lucas por la aclaracion también! Saludos.
__________________

Last edited by Neeeeeeeeeel.-; 12-22-2011 at 19:22.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
 



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 15:36.


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