Raised This Month: $ Target: $400
 0% 

Whats the problem here?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Udi
Junior Member
Join Date: Aug 2009
Old 12-24-2009 , 12:24   Whats the problem here?
Reply With Quote #1

Ive tried to make on menu to activate another plugin with the server_cmd command. while the compile he gave me error: Error: Invalid function call, not a valid address on line 435
The errors with bold and underline
Code:
public submenu5(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 tempid = str_to_num(data);
    strip_user_weapons(tempid);
    server_cmd("molotov_give %d",tempid())
    fm_set_rendering(tempid, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20)
    
    strip_user_weapons(id)
    set_user_health(id, 250)
    server_cmd("molotov_give %d",id())
    fm_set_rendering(id, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)
            
    new szName[32], szName2[32]
    get_user_name(id, szName, 31);
    get_user_name(tempid, szName2, 31);
    set_hudmessage( 0, 255, 0, -1.0, 0.40, 2, 5.0, 8.0, 0.0, 0.0, 10)
    show_hudmessage(0, "%s vs %s^n Molotov Duel",szName, szName2)   

    if( is_user_alive(tempid) )
        set_user_health(tempid, 250);
    
    menu_destroy(menu);
    return PLUGIN_HANDLED;
 }

Last edited by Udi; 12-24-2009 at 12:39.
Udi is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 12-24-2009 , 12:36   Re: Whats the problem here?
Reply With Quote #2

You have to remove the ().
Id is a integrer var, no a function.
Mxnn is offline
Udi
Junior Member
Join Date: Aug 2009
Old 12-24-2009 , 12:38   Re: Whats the problem here?
Reply With Quote #3

ok i think i fixed it thx

Last edited by Udi; 12-24-2009 at 12:45.
Udi 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 04:17.


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