Raised This Month: $ Target: $400
 0% 

Compile Error/Code Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Killer12201
Senior Member
Join Date: Dec 2007
Old 07-27-2011 , 06:06   Re: Compile Error/Code Help
Reply With Quote #1

So what should I change it too? I looked in the BF2 menu section at that point to get help with menu's with sub sections. I'm not very good with menu's and got really confused on that part of it.

Edit: That part was supposed to do with this part. The cases were supposed to be the menu items but I'm assuming I did that wrong.

Code:
public pokemenu(id)
{
    new menu = menu_create("\rPoke Rank \wMenu", "menu_handler");
    
    menu_additem(menu, "\r25k Poke Rank \wMenu", "0", 0);
    menu_additem(menu, "\r50k Poke Rank \wMenu", "1", 0);
    menu_additem(menu, "\r75k Poke Rank \wMenu", "2", 0);
    menu_additem(menu, "\r100k Poke Rank \wMenu", "3", 0);
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    
    menuselection[id]=MENU_MAIN
    
    menu_display(id, menu, 0);
    
    return PLUGIN_CONTINUE;
}
__________________

Last edited by Killer12201; 07-27-2011 at 06:09.
Killer12201 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-27-2011 , 07:01   Re: Compile Error/Code Help
Reply With Quote #2

You need to use one switch for each set of cases, like this:

PHP Code:
    switch(menuselection[id])
    {
        case 
MENU_MAIN:
        {
            switch(
key)
            {
                case 
0pokerank1(id);
                case 
1pokerank2(id);
                case 
2pokerank3(id);
                case 
3pokerank4(id);
            }
        }
        case 
MENU_POKE1:
        {
            switch(
key)
            {
                case 
0// function
                
case 1// function2
                // ...
            
}
        }
        
// ...
    

__________________

Last edited by fysiks; 07-27-2011 at 07:03.
fysiks 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 00:55.


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