Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
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
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-10-2009 , 15:20   Re: errors compiling: invalid function, should return a value, already declared
Reply With Quote #2

You have an extra } before the last menu_destroy
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-10-2009 , 15:23   Re: errors compiling: invalid function, should return a value, already declared
Reply With Quote #3

o lol) indeed
Owyn is offline
Send a message via ICQ to Owyn
Reply


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


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