Raised This Month: $ Target: $400
 0% 

Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Compro
Junior Member
Join Date: Nov 2011
Old 11-19-2011 , 05:09   Menu
Reply With Quote #1

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(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}
public 
menu_handler(idmenuitem){
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
new 
data[6], szName[64];
new 
accesscallback;
menu_item_getinfo(menuitemaccessdata,charsmax(data), szNamecharsmax(szName), callback);
new 
key str_to_num(data);
switch(
key){
    case 
1:
    {
        
client_print(idprint_chat"Well done , you selected 1st selection");
    }
    case 
2:
    {
        
client_print(idprint_chat"HEHE , you choosed 2nd section");
    }
    case 
3:
    {
        
client_print(idprint_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.

Last edited by Compro; 11-19-2011 at 05:10.
Compro is offline
 


Thread Tools
Display Modes

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:28.


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