Raised This Month: $ Target: $400
 0% 

errors compiling: invalid function, should return a value, already declared [solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-10-2009 , 15:19   errors compiling: invalid function, should return a value, already declared [solved]
Reply With Quote #1

Code:
 public menu_handler3(id, menu, item)
 {
   if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }

    new data[6], iName[64]
    new access, callback

    menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)

    new key = str_to_num(data)
 
    switch(key)
    {
        case 1:{
            menu_destroy(menu);
            return PLUGIN_HANDLED;
        }
        case 2:{
            menu_destroy(menu);
            menu1(id);
            return PLUGIN_HANDLED;
        }

        }
    }

    menu_destroy(menu);
    return PLUGIN_HANDLED;
}
function menu_handler3 should return a value
symbol already defined menu_destroy
and it also says that "return PLUGIN_HANDLED" is an invalid function or declaration
Owyn is offline
Send a message via ICQ to Owyn
 



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 09:02.


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