Raised This Month: $51 Target: $400
 12% 

Multi-Dimensional arrays must be fully initialized


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 02-25-2013 , 13:30   Multi-Dimensional arrays must be fully initialized
Reply With Quote #1

Here's the code:
PHP Code:
#include <amxmodx>

enum _ENUM_BLA
{
    
Bla1[33],
    
Bla2[33]
};

new const 
CONST_BLA[ENUM_BLA][] =
{
    
"Bla1",
    
"Bla2"
}

new 
g_Test[33];

public 
plugin_init() 
{
    
register_clcmd("say /menu""Menu")
}

public 
Menu(id)
{
    new 
menu menu_create("Bla bla bla""Menu_Handler")
    
    for(new 
0sizeof(CONST_BLA); i++)
    {
        
menu_additem(menuCONST_BLA[i], "")
    }
    
    
menu_setprop(menuMPROP_PERPAGE0)
    
menu_display(idmenu0)
}

public 
Menu_Handler(idmenuitem)
{    
    
g_Test[id] = item
    client_print
(idprint_chat"[AMXX] You selected [%s]"CONST_BLA[g_Test[id]])


Last edited by EpicMonkey; 02-25-2013 at 13:30.
EpicMonkey is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-26-2013 , 02:03   Re: Multi-Dimensional arrays must be fully initialized
Reply With Quote #2

It helps if you actually ask a question . . .

P.S. Your array has 3 dimensions.
__________________

Last edited by fysiks; 02-26-2013 at 02: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 08:34.


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