Raised This Month: $ Target: $400
 0% 

Code warning, why? :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kikifrh
Senior Member
Join Date: May 2009
Old 05-29-2010 , 21:07   Code warning, why? :(
Reply With Quote #1

well guys I made an code but I get errors
here is the code:
Code:
GiveMoney(id)
{
    new iMoney = cs_get_user_money(id);

      if ( iMoney >= 16000 )
    {
        return PLUGIN_HANDLED;
    } 
    
    else if ( iMoney < 16000 || iMoney > 11000 )
    {
        cs_set_user_money(id, 16000);
    }

    else if ( get_user_team(id) == 3 )
    {
        set_hudmessage(40, 60, 150, -1.0, 0.84, 0, 0.50, 0.50, 0.50, 0.50, 2);
        show_hudmessage(id, "Spectators can't use this fuction");
    }

    else if ( is_user_alive(id) && !GiveMoney[id] && get_user_team(id) == 1 )
    {
        cs_set_user_money(id, cs_get_user_money (id) + 5000);
        GiveMoney[id] = true;
    }

    else if ( GiveMoney[id] )
    {
        set_hudmessage(40, 60, 150, -1.0, 0.84, 0, 0.50, 0.50, 0.50, 0.50, 2);
        show_hudmessage(id, "You already got you money on this map");
    }
}
this is my warning:
warning 209: function "GiveMoney" should return a value
how can I fix? Thx
P.S: The only way of making givemoney = false is on change map.
P.S2: I just started getting errors after adding the red letters code
kikifrh is offline
 



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 05:21.


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