Raised This Month: $51 Target: $400
 12% 

My plugin failed to compile!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
X3N0M
New Member
Join Date: Apr 2019
Old 04-14-2019 , 20:16   My plugin failed to compile!
Reply With Quote #1

Hi friends!
If I try to compile this plugin an error appears, can you help me?
Or does someone have a plugin that at the beginning of the round shows the teammates money in the chat?

Plugin:

Code:
#include <amxmodx>
#include <cstrike>

#define MAX_ROWS 5

public plugin_init()
{
    register_plugin("Show Team Money", "1.0", "OciXCrom")
    register_logevent("OnRoundStart", 2, "1=Round_Start")
}

public OnRoundStart()
{
    new szMoneyT[MAX_ROWS][128], szMoneyCT[MAX_ROWS][128], iPlayers[32], iPnum
    get_players(iPlayers, iPnum)

    for(new i, c, t, iPlayer, szName[32]; i < iPnum; i++)
    {
        iPlayer = iPlayers[i]
        
        switch(cs_get_user_team(iPlayer))
        {
            case CS_TEAM_T:
            {
                if(t >= MAX_ROWS - 1)
                    continue

                get_user_name(iPlayer, szName, charsmax(szName))
                formatex(szMoneyT[t], charsmax(szMoneyT[]), "* Your teammate %s has got %i$", szName, cs_get_user_money(iPlayer))
                t++
            }
            case CS_TEAM_CT:
            {
                if(c >= MAX_ROWS - 1)
                    continue

                get_user_name(iPlayer, szName, charsmax(szName))
                formatex(szMoneyCT[c], charsmax(szMoneyCT[]), "* Your teammate %s has got %i$", szName, cs_get_user_money(iPlayer))
                c++
            }
        }
    }

    for(new i; i < iPnum; i++)
    {
        switch(cs_get_user_team(iPlayers[i])
        {
            case CS_TEAM_T:
            {
                for(new t; t < MAX_ROWS - 1; t++)
                    client_print(iPlayers[i], print_chat, szMoneyT[t])
            }
            case CS_TEAM_CT:
            {
                for(new c; c < MAX_ROWS - 1; c++)
                    client_print(iPlayers[i], print_chat, szMoneyCT[c])
            }
        }
    }
}

Error:

Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textr13btR.sma(47) : error 001: expected token: ")", but found "{"

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textr13btR.amx (compile failed).
Attached Thumbnails
Click image for larger version

Name:	Capturar.PNG
Views:	86
Size:	16.8 KB
ID:	174998  

Last edited by X3N0M; 04-15-2019 at 12:58.
X3N0M 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 12:10.


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