Hello, i am making basic menu . And when I compile .sma it compiles with error.
PHP Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_clcmd( "Menu1","Menu2");
}
public Menu2(id)
{
new menu = menu_create( "\rAdvanced shop v1:", "menu_handler");
menu_additem(menu, "\wSelection #1", "1", 0);
menu_additem(menu, "\wSelection #2", "2", 0);
menu_additem(menu, "\wSelection #3", "3", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
public menu_handler(id, menu, item){
if (item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName, charsmax(szName), callback);
new key = str_to_num(data);
switch(key){
case 1:
{
client_print(id, print_chat, "Well done , you selected 1st selection");
}
case 2:
{
client_print(id, print_chat, "HEHE , you choosed 2nd section");
}
case 3:
{
client_print(id, print_chat, "You choosed 3rd section");
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
It say's that 23 row has error: warning 217: loose indentation.
Row 23 :
PHP Code:
new data[6], szName[64];
, why compiler shows to me an error ?
Thanks for support.