Problem z colorchatem wynik.amxx
dtau99
05.01.2015
Witam proszę o pomoc z pluginem wynik.amxx wywala mi logi takie:
L 01/05/2015 - 10:36:32: [AMXX] Displaying debug trace (plugin "Wynik.amxx")
L 01/05/2015 - 10:36:32: [AMXX] Run time error 4: index out of bounds
L 01/05/2015 - 10:36:32: [AMXX] [0] wynik_2664789.sma::ColorChat (line 139)
L 01/05/2015 - 10:36:32: [AMXX] [1] wynik_2664789.sma::Nowa_Runda (line 60)
Załączam sma pluginy
Attached Files
dtau99
05.01.2015
przy kompilaci amxx wyskoczylo to :
Welcome to the AMX Mod X 1.8.1-300 Compiler.Copyright © 1997-2006 ITB CompuPhase, AMX Mod X TeamWynik.sma(14) : warning 201: redefinition of constant/macro (symbol "Color")Wynik.sma(27) : error 021: symbol already defined: "TeamName"Wynik.sma(97) : error 021: symbol already defined: "ColorChat"Wynik.sma(145) : error 021: symbol already defined: "ShowColorMessage"Wynik.sma(153) : error 021: symbol already defined: "Team_Info"Wynik.sma(163) : error 021: symbol already defined: "ColorSelection"Wynik.sma(184) : error 021: symbol already defined: "FindPlayer"6 Errors.Could not locate output file Wynik.amxx (compile failed).
IntelCom
06.01.2015
Tu masz wersję poprawioną.
#include <amxmodx> #include <colorchat> #define PLUGIN "xXPLUGINXx" #define VERSION "1.0" #define AUTHOR "Pan Marian" new tt, ct, maxPlayers, msg[7][]={{},{},{},{}, {"***** Mamy remis!^x01 %d : %d"}, {"***** Prowadza Terrorysci^x01 wynikiem %d : %d"}, {"***** Prowadza Antyterrorysci^x01 wynikiem %d : %d"} }; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("RoundEnd", 2, "1=Round_End"); register_logevent("GRA", 2, "1=Game_Commencing"); register_event("SendAudio", "event_roundend_T", "a", "2&%!MRAD_terwin"); register_event("SendAudio", "event_roundend_CT", "a", "2&%!MRAD_ctwin"); } public plugin_cfg(){ maxPlayers=get_maxplayers(); } public event_roundend_T(id){ ++tt; } public event_roundend_CT(){ ++ct; } public GRA(id){ tt=ct=0; } public RoundEnd(){ new Color:color=GREY; new team[2]; if(ct>tt){ team[0]=ct; team[1]=tt; color=BLUE; } else { team[0]=tt; team[1]=ct; if(tt>ct){ color=RED; } } for(new i=1; i<=maxPlayers; ++i){ if(is_user_connected(i)){ ColorChat(i, color, msg[_:color], team[0], team[1]); } } }