Raised This Month: $ Target: $400
 0% 

fix compilation errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lqlqlq
Senior Member
Join Date: Jan 2008
Old 08-11-2011 , 09:44   fix compilation errors
Reply With Quote #1

undefined symbol "id"
line 25 - expression has no effect
25 - expected token ";", but not found
29 - invalid expression, assumed zero
25 - too many error messages on line
Thanks!
Code:
#include <amxmodx>
#include <cstrike>


public plugin_init()
{
    register_plugin("Money for losing team", "1.0", "Jelle")
    
    register_event("SendAudio", "tr_win", "a", "2&%!MRAD_terwin")
    register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}

public tr_win()
{
    new players[32], playerCount, i, player
    get_players(players, playerCount, "h")
    
    for ( i = 0; i < playerCount; i++ )
    {
        player = players[i]
        
        if ( cs_get_user_team(player) == CS_TEAM_CT )
        {
            cs_set_user_money(player, cs_get_user_money(player) + 1400)
            ColorMessage(id, "^x04[AMXX]^x03 Counter-Terrorist Team is losing and receives 1400$ Bonus") 
        }
    }
}

public ct_win()
{
    new players[32], playerCount, i, player
    get_players(players, playerCount, "h")
    
    for ( i = 0; i < playerCount; i++ )
    {
        player = players[i]
        
        if ( cs_get_user_team(player) == CS_TEAM_T )
        {
            cs_set_user_money(player, cs_get_user_money(player) + 1400)
            ColorMessage(id, "^x04[AMXX]^x03 Terrorist Team is losing and receives 1400$ Bonus") 
        }
    }
}  

    stock ColorMessage(const id, const input[], any:...){
        new count = 1, players[32];
        static msg[ 191 ];
        vformat(msg, 190, input, 3);
        if (id) players[0] = id; else get_players(players , count , "ch"); {
            for (new i = 0; i < count; i++){
                if (is_user_connected(players[i])){
                    message_begin(MSG_ONE_UNRELIABLE , get_user_msgid("SayText"), _, players[i]);
                    write_byte(players[i]);
                    write_string(msg);
                    message_end();}}}
    }
lqlqlq 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 03:24.


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