Raised This Month: $ Target: $400
 0% 

menu_additem in for loop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-22-2016 , 15:59   Re: menu_additem in for loop
Reply With Quote #5

I'll just ignore the param, didn't know i could, thanks, what about problem number 2? This could be done in a loop aswell but i just can't seem to figure out how..

PHP Code:
        case 0RollTheDice(id2510)
        case 
1RollTheDice(id5025)
        case 
2RollTheDice(id12550)
        case 
3RollTheDice(id250100)
        case 
4RollTheDice(id600200
I tried this, but it doesn't work.
PHP Code:
case 0..4: {
            for(new 
isizeof(iCosts); i++) {
                
RollTheDice(idiCosts[i], iPrices[i])
            }




PHP Code:
new iCosts[] = {
    
25,
    
50,
    
125,
    
250,
    
600
}

new 
iPrices[] ={
    
10,
    
25,
    
50,
    
100,
    
200

__________________

Last edited by Napoleon_be; 05-22-2016 at 16:06.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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 18:39.


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