Ошибка с компелированием плагинов на amxx 1.8.3 (ColorChat)

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
95
Реакции
6
Помог
2 раз(а)
Ошибка
error 021: symbol already defined: "TeamName"
aes_bonus_cstrike.sma(161) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(184) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(218) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(229) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(237) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(245) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(27) : warning 203: symbol is never used: "ColorChat"
aes_bonus_cstrike.sma(64) : warning 203: symbol is never used: "ColorSelection"
aes_bonus_cstrike.sma(59) : warning 203: symbol is never used: "FindPlayer"
aes_bonus_cstrike.sma(66) : warning 203: symbol is never used: "ShowColorMessage"
aes_bonus_cstrike.sma(70) : warning 203: symbol is never used: "Team_Info"
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
/*
Advanced Experience System
by serfreeman1337 http://gf.hldm.org/
*/

/*
Random CSTRIKE Bonuses
*/

#include <amxmodx>
#include <aes_v>
#include <engine>
#include <reapi>

#define PLUGIN "AES: Bonus CSTRIKE"
#define VERSION "0.5.9 [REAPI]"
#define AUTHOR "serfreeman1337/sonyx"
#define LASTUPDATE "12, March (03), 2018"

#if AMXX_VERSION_NUM < 183
#include <colorchat>

#define print_team_default DontChange
#define print_team_grey Grey
#define print_team_red Red
#define print_team_blue Blue

#define MAX_NAME_LENGTH 32
#define MAX_PLAYERS 32

#define client_disconnected client_disconnect
#endif

enum _:
{
SUPER_NICHEGO,
SUPER_NADE,
SUPER_DEAGLE
};

enum DamagerModes
{
Disable,
ModeAll,
ModeIfVisible
};

new g_PlayerPos[MAX_PLAYERS + 1], g_iSyncMsg, g_iSyncMsg2, DamagerModes:g_ModeDam[MAX_PLAYERS + 1];
new const Float:g_flCoords[][] = { {0.55, 0.55}, {0.5, 0.55}, {0.55, 0.5}, {0.45, 0.5}, {0.45, 0.45}, {0.5, 0.45}, {0.55, 0.45}, {0.45, 0.55} };
new g_players[MAX_PLAYERS + 1];
new bool: g_PointDam[MAX_PLAYERS + 1] = false;

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

RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage", false);
RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true);
register_event ("Damage", "EventDamage", "b", "2!0");

g_iSyncMsg = CreateHudSyncObj();
g_iSyncMsg2 = CreateHudSyncObj();
}

public client_disconnected(id)
g_players[id] = SUPER_NICHEGO; // сбрасываем возможности на дисконнекте

public CBasePlayer_Killed_Post(const victim, const killer)
g_players[victim] = SUPER_NICHEGO; // сбрасываем возможности при смерти

public CBasePlayer_TakeDamage(const id, idinflictor, idattacker, Float:damage)
{
if(!is_user_connected(idattacker))
return HC_CONTINUE;

if(g_players[idattacker])
{
if(idattacker == idinflictor && get_member(get_member(idattacker, m_pActiveItem), m_iId) == WEAPON_DEAGLE && (g_players[idattacker] & (1 << SUPER_DEAGLE)))
{
damage *= 2.0;
}
else if(FClassnameIs(idinflictor, "grenade") && (g_players[idattacker] & (1 << SUPER_NADE)))
{
set_task(0.5,"deSetNade",idattacker);
damage *= 3.0;
}

SetHookChainArg(4, ATYPE_FLOAT, damage);
}
return HC_CONTINUE;
}

public EventDamage(iVictim)
{
static iKiller;
iKiller = get_user_attacker(iVictim);

if(!iKiller || iKiller > MAX_PLAYERS) return;

new iPos = ++g_PlayerPos[iKiller];

if(iPos == sizeof(g_flCoords))
iPos = g_PlayerPos[iKiller] = 0;

if (g_PointDam[iKiller] && iVictim != iKiller)
{
if (g_ModeDam[iKiller] == ModeAll || (g_ModeDam[iKiller] == ModeIfVisible && is_visible(iVictim, iKiller)))
{
set_hudmessage(0, 100, 200, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.0, 1.0, 0.0, 0.0);
ShowSyncHudMsg(iKiller, g_iSyncMsg, "%i^n", read_data(2));
}
}
if (g_PointDam[iVictim])
{
set_hudmessage(200, 100, 0, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.0, 1.0, 0.0, 0.0);
ShowSyncHudMsg(iVictim, g_iSyncMsg2, "%i^n", read_data(2));
}
}

public deSetNade(id)
g_players[id] &= ~(1<<SUPER_NADE);

public roundBonus_GiveDefuser(id,cnt)
{
if(!cnt)
return false;

if(get_member(id, m_iTeam) != TEAM_CT)
return false;

rg_give_item(id, "item_thighpack");

return true;
}

public roundBonus_GiveNV(id,cnt)
{
if(!cnt)
return false;

set_member(id, m_bHasNightVision, 1);

return true;
}

public roundBonus_Dmgr(id,DamagerModes:cnt)
{
if(cnt <= Disable)
return false;

g_PointDam[id] = true;
g_ModeDam[id] = (ModeAll < cnt <= ModeIfVisible) ? cnt : ModeAll;

return true;
}

public GiveArmor(id,cnt)
{
if(!is_user_alive(id))
{
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
return false;
}

if(!cnt)
return false;

new iArmor = rg_get_user_armor(id);

switch(cnt)
{
case 1:rg_set_user_armor(id, max(100, iArmor), ARMOR_KEVLAR);
case 2:rg_set_user_armor(id, max(100, iArmor), ARMOR_VESTHELM);
default:rg_set_user_armor(id, max(cnt, iArmor), ARMOR_VESTHELM);
}

return true;
}

public GiveHP(id,cnt)
{
if(!is_user_alive(id))
{
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
return false;
}

if(!cnt)
return false;

set_entvar(id, var_health, (Float:get_entvar(id, var_health) + float(cnt)));
return true;
}

public GiveMoney(id,cnt)
{
if(!cnt)
return false;

rg_add_account(id, cnt);

return true;
}


public pointBonus_Dmgr(id)
{
g_PointDam[id] = true;

return true;
}


public pointBonus_GiveMegaGrenade(id)
{
if(!is_user_alive(id))
{
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
return false;
}

if(!user_has_weapon(id,CSW_HEGRENADE))
{
rg_give_item(id, "weapon_hegrenade");
}

g_players[id] |= (1<<SUPER_NADE);

client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_BONUS_GET_MEGAGRENADE");

return true;
}

public pointBonus_GiveMegaDeagle(id){
if(!is_user_alive(id))
{
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
return false;
}

rg_give_item(id, "weapon_deagle", GT_REPLACE);
rg_set_user_bpammo(id, WEAPON_DEAGLE, 35);

g_players[id] |= (1<<SUPER_DEAGLE);
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_BONUS_GET_MEGADEAGLE");

return true;
}


/**
* Совместимость со старым bonus.ini
*/
public pointBonus_Give10000M(id)
GiveMoney(id, 10000);

public pointBonus_Set200HP(id)
GiveHP(id, 200);

public pointBonus_Set200CP(id)
GiveArmor(id, 200);
Уже не знаю в чем проблема.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
22
Реакции
1
Код:
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
попроьуй сменить на
Код:
client_print_color(print_team_default,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
client_print_color(id
-->
client_print_color(print_team_default

или я перепутал:pardon:
client_print_color(id,0,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
-->
client_print_color(id,print_team_default,"%L %L",id,"AES_TAG",id,"AES_ANEW_ALIVE");
 
Последнее редактирование:
Сообщения
95
Реакции
6
Помог
2 раз(а)
Dzidzio,
\colorchat.inc(19) : error 021: symbol already defined: "TeamName"
aes_bonus_cstrike.sma(161) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(184) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(218) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(229) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(237) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(245) : error 017: undefined symbol "client_print_color"
aes_bonus_cstrike.sma(27) : warning 203: symbol is never used: "ColorChat"
aes_bonus_cstrike.sma(64) : warning 203: symbol is never used: "ColorSelection"
aes_bonus_cstrike.sma(59) : warning 203: symbol is never used: "FindPlayer"
aes_bonus_cstrike.sma(66) : warning 203: symbol is never used: "ShowColorMessage"
aes_bonus_cstrike.sma(70) : warning 203: symbol is never used: "Team_Info"
Изменил ни чего не поменялось... colorchat на 182 работает нормально на 183 не работает...
 
Сообщения
496
Реакции
621
Помог
16 раз(а)
У вас точно компилятор для 183?
Потому что я буквально только что скомпил.
Вы не онлайн компилите, локально?
 
Сообщения
95
Реакции
6
Помог
2 раз(а)
Gudaus, Да, инклюд colorchat какой то багнутый. Сейчас все норм:D
Можно закрыть тему если это необходимо.
 
Статус
В этой теме нельзя размещать новые ответы.

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

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