Raised This Month: $ Target: $400
 0% 

random problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
manfailui
Member
Join Date: Jun 2012
Location: Hong Kong
Old 05-29-2013 , 06:43   random problems
Reply With Quote #1

PHP Code:
new g_abc123 13579
random
(g_abc123)

switch(
g_abc123)
{
    case 
1//
    
case 3//
    
case 5//
    
case 7//
    
case 9//

work?
__________________
I Come from Hong Kong.
my English is very poor

Last edited by manfailui; 05-29-2013 at 06:44.
manfailui is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-29-2013 , 07:32   Re: random problems
Reply With Quote #2

have you tried it?
__________________
Blizzard_87 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-29-2013 , 11:59   Re: random problems
Reply With Quote #3

PHP Code:
switch(random_num(1,9))
{
    case 
1//
    
case 3//
    
case 5//
    
case 7//
    
case 9//

.Dare Devil. is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 05-30-2013 , 00:45   Re: random problems
Reply With Quote #4

Quote:
Originally Posted by .Dare Devil. View Post
PHP Code:
switch(random_num(1,9))
{
    case 
1//
    
case 3//
    
case 5//
    
case 7//
    
case 9//

I'm not sure, maybe he wants to this
PHP Code:
new const g_abc123[] = { 1357}

switch( 
g_abc123randomsizeof g_abc123 ) ] )
{
    case 
1// ..
    
case 3// ..
    
case 5// ..
    
case 7// ..
    
case 9// ..

But i don't see any reason why need to do this, because you can also get a random number from 1 ~ 5, and it's same.

so maybe you answer is right.
__________________
youtube:
@holla16
11922911 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 16:28.


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