Ошибка Компиляции Speclist_rus

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
79
Реакции
1
Ошибка
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(28) : error 021: symbol already defined: "client_print_color"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(31) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(33) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(36) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(40) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(57) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(59) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(63) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(68) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(70) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(74) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(76) : warning 218: old style prototypes used with optional semicolumns
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(77) : error 054: unmatched closing brace
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(79) : warning 218: old style prototypes used with optional semicolumns
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(80) : error 054: unmatched closing brace
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(83) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(88) : error 021: symbol already defined: "get_players"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(89) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(91) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(96) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(98) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(101) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(105) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(106) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(109) : error 021: symbol already defined: "ArrayPushCell"
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(113) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(121) : error 010: invalid function or declaration
/hlds/web/www/amxxpc/bin/amxx-1.9.0/include/colorchat.inc(123) : error 010: invalid function or declaration

Compilation aborted.
26 Errors.
Done.
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>
#include <colorchat>

#pragma semicolon 1

#define UPDATEINTERVAL 1.0

#define ECHOCMD

#define FLAG ADMIN_IMMUNITY

new const PLUGIN[] = "SpecList";
new const VERSION[] = "1.2a";
new const AUTHOR[] = "SasaiLalka";

new gMaxPlayers;
new gCvarOn;
new gCvarImmunity;
new bool:gOnOff[33] = { true, ... };

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);

register_cvar(PLUGIN, VERSION, FCVAR_SERVER, 0.0);
gCvarOn = register_cvar("amx_speclist", "1", 0, 0.0);
gCvarImmunity = register_cvar("amx_speclist_immunity", "1", 0, 0.0);

register_clcmd("say /spec", "cmdSpecList", -1, "");
register_clcmd("say_team /spec", "cmdSpecList", -1, "");

gMaxPlayers = get_maxplayers();

set_task(UPDATEINTERVAL, "tskShowSpec", 123094, "", 0, "b", 0);
}

public cmdSpecList(id)
{
if( gOnOff[id] )
{
ColorChat(id, RED, "^1[^4MCS^1] Список наблюдателей ^3Выключен.");
gOnOff[id] = false;
}
else
{
ColorChat(id, BLUE, "^1[^4MCS^1] Список наблюдателей ^3Включен.");
gOnOff[id] = true;
}

#if defined ECHOCMD
return PLUGIN_CONTINUE;
#else
return PLUGIN_HANDLED;
#endif
}

public tskShowSpec()
{
if( !get_pcvar_num(gCvarOn) )
{
return PLUGIN_CONTINUE;
}

static szHud[1102];
static szName[34];
static bool:send;

for( new alive = 1; alive <= gMaxPlayers; alive++ )
{
new bool:sendTo[33];
send = false;

if( !is_user_alive(alive) )
{
continue;
}

sendTo[alive] = true;

get_user_name(alive, szName, 32);
format(szHud, 245, "Игрок: %s^nHP: %d | Armor: %d^n^nНаблюдают:^n", szName, get_user_health(alive), get_user_armor(alive));

for( new dead = 1; dead <= gMaxPlayers; dead++ )
{
if( is_user_connected(dead) )
{
if( is_user_alive(dead)
|| is_user_bot(dead) )
{
continue;
}

if( pev(dead, pev_iuser2) == alive )
{
if( !(get_pcvar_num(gCvarImmunity)&&get_user_flags(dead, 0)&FLAG) )
{
get_user_name(dead, szName, 32);
add(szName, 33, "^n", 0);
add(szHud, 1101, szName, 0);
send = true;
}

sendTo[dead] = true;

}
}
}

if( send == true )
{
for( new i = 1; i <= gMaxPlayers; i++ )
{
if( sendTo[i] == true
&& gOnOff[i] == true )
{
set_hudmessage(0, 255, 0, 0.75, 0.15, 0, 0.0, UPDATEINTERVAL + 0.1, 0.0, 0.0, -1);

show_hudmessage(i, szHud);
}
}
}
}

return PLUGIN_CONTINUE;
}

public client_connect(id)
{
gOnOff[id] = true;
}

public client_disconnect(id)
{
gOnOff[id] = true;
}
Нашёл старенький плагин Speclist_Rus Хочу его поставить на сервер. Столкнулся с проблемой под Amx Mod X 1.9.0 не получилось

Подскажите как Исправить. Плагин старый Хотелось бы чтобы Знающий человек посмотрел код и возможно там есть другие ошибки.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
79
Реакции
1
AMX Mod X Compiler 1.9.0.5271
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

/hlds/web/www/amxxpc/work/scripting/202104/1611851198/speclist_rus.sma(43) : error 017: undefined symbol "ColorChat"
/hlds/web/www/amxxpc/work/scripting/202104/1611851198/speclist_rus.sma(43) : warning 215: expression has no effect
/hlds/web/www/amxxpc/work/scripting/202104/1611851198/speclist_rus.sma(43) : error 001: expected token: ";", but found ")"
/hlds/web/www/amxxpc/work/scripting/202104/1611851198/speclist_rus.sma(43) : error 029: invalid expression, assumed zero
/hlds/web/www/amxxpc/work/scripting/202104/1611851198/speclist_rus.sma(43) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
Done.
 
Сообщения
1,336
Реакции
528
Помог
91 раз(а)
Mizer,
Код:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>
// #include <colorchat>

#pragma semicolon 1

#define UPDATEINTERVAL 1.0

#define ECHOCMD

#define FLAG ADMIN_IMMUNITY

new const PLUGIN[] = "SpecList";
new const VERSION[] = "1.2a";
new const AUTHOR[] = "SasaiLalka";

new gMaxPlayers;
new gCvarOn;
new gCvarImmunity;
new bool:gOnOff[33] = { true, ... };

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    register_cvar(PLUGIN, VERSION, FCVAR_SERVER, 0.0);
    gCvarOn = register_cvar("amx_speclist", "1", 0, 0.0);
    gCvarImmunity = register_cvar("amx_speclist_immunity", "1", 0, 0.0);
    
    register_clcmd("say /spec", "cmdSpecList", -1, "");
    register_clcmd("say_team /spec", "cmdSpecList", -1, "");
    
    gMaxPlayers = get_maxplayers();
    
    set_task(UPDATEINTERVAL, "tskShowSpec", 123094, "", 0, "b", 0);
}

public cmdSpecList(id)
{
    if( gOnOff[id] )
    {
        client_print_color(id, print_team_default, "^1[^4MCS^1] Список наблюдателей ^3Выключен.");
        gOnOff[id] = false;
    }
    else
    {
        client_print_color(id, print_team_default, "^1[^4MCS^1] Список наблюдателей ^3Включен.");
        gOnOff[id] = true;
    }
    
    #if defined ECHOCMD
    return PLUGIN_CONTINUE;
    #else
    return PLUGIN_HANDLED;
    #endif
}

public tskShowSpec()
{
    if( !get_pcvar_num(gCvarOn) )
    {
        return PLUGIN_CONTINUE;
    }
    
    static szHud[1102];
    static szName[34];
    static bool:send;
    
    for( new alive = 1; alive <= gMaxPlayers; alive++ )
    {
        new bool:sendTo[33];
        send = false;
        
        if( !is_user_alive(alive) )
        {
            continue;
        }

        sendTo[alive] = true;

        get_user_name(alive, szName, 32);
        format(szHud, 245, "Игрок: %s^nHP: %d | Armor: %d^n^nНаблюдают:^n", szName, get_user_health(alive), get_user_armor(alive));
        
        for( new dead = 1; dead <= gMaxPlayers; dead++ )
        {
            if( is_user_connected(dead) )
            {
                if( is_user_alive(dead)
                || is_user_bot(dead) )
                {
                    continue;
                }
                
                if( pev(dead, pev_iuser2) == alive )
                {
                    if( !(get_pcvar_num(gCvarImmunity)&&get_user_flags(dead, 0)&FLAG) )
                    {
                        get_user_name(dead, szName, 32);
                        add(szName, 33, "^n", 0);
                        add(szHud, 1101, szName, 0);
                        send = true;
                    }

                    sendTo[dead] = true;
                    
                }
            }
        }
        
        if( send == true )
        {
            for( new i = 1; i <= gMaxPlayers; i++ )
            {
                if( sendTo[i] == true
                && gOnOff[i] == true )
                {
                    set_hudmessage(0, 255, 0, 0.75, 0.15, 0, 0.0, UPDATEINTERVAL + 0.1, 0.0, 0.0, -1);
                    
                    show_hudmessage(i, szHud);
                }
            }
        }
    }
    
    return PLUGIN_CONTINUE;
}

public client_connect(id)
{
    gOnOff[id] = true;
}

public client_disconnected(id)
{
    gOnOff[id] = true;
}
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу