Senior Member
|
12-05-2017
, 16:19
Re: uq_jumpstats v2.42
|
#585
|
Greetings!
Just here to ask for a little help with this? Would much appreciate it. Running AMXX 1.8.2
PHP Code:
L 12/05/2017 - 07:04:51: Start of error session. L 12/05/2017 - 07:04:51: Info (map "deathrun_minecraft_fg") (file "addons/amxmodx/logs/error_20171205.log") L 12/05/2017 - 07:04:51: [AMXX] Displaying debug trace (plugin "uq_jumpstats.amxx") L 12/05/2017 - 07:04:51: [AMXX] Run time error 4: index out of bounds L 12/05/2017 - 07:04:51: [AMXX] [0] colorchat.inc::ColorChat (line 74) L 12/05/2017 - 07:04:51: [AMXX] [1] uq_jumpstats.sma::Color_Chat_Lang (line 8166) L 12/05/2017 - 07:04:51: [AMXX] [2] uq_jumpstats.sma::Color_Chat_Lang (line 8164) L 12/05/2017 - 07:04:51: [AMXX] [3] uq_jumpstats.sma::ResetHUD (line 8758)
Thanks!
EDIT : Yep I found this reply :
Quote:
Originally Posted by wAyz
Code:
L 06/27/2013 - 14:49:16: [AMXX] Displaying debug trace (plugin "uq_jumpstats.amxx")
L 06/27/2013 - 14:49:16: [AMXX] Run time error 4: index out of bounds
L 06/27/2013 - 14:49:16: [AMXX] [0] colorchat.inc::ColorChat (line 74)
L 06/27/2013 - 14:49:16: [AMXX] [1] uq_jumpstats.sma::Color_Chat_Lang (line 8166)
L 06/27/2013 - 14:49:16: [AMXX] [2] uq_jumpstats.sma::Color_Chat_Lang (line 8164)
L 06/27/2013 - 14:49:16: [AMXX] [3] uq_jumpstats.sma::ResetHUD (line 8754)
I've managed to fix those errors listed above with a little edit in colorchat.inc:
Code:
/* Fun functions
*
* by Numb
*
* This file is provided as is (no warranties).
*/
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
static message[256];
switch(type)
{
case NORMAL: // clients scr_concolor cvar color
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}
vformat(message[1], 251, msg, 4);
// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';
static team, ColorChange, index, MSG_Type;
if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}
team = get_user_team(index);
if( team >= 0 && team < 4 )
{
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
}
}
ShowColorMessage(id, type, message[])
{
message_begin(type, get_user_msgid("SayText"), _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
message_begin(type, get_user_msgid("TeamInfo"), _, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}
ColorSelection(index, type, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, type, TeamName[1]);
}
case BLUE:
{
return Team_Info(index, type, TeamName[2]);
}
case GREY:
{
return Team_Info(index, type, TeamName[0]);
}
}
return 0;
}
FindPlayer()
{
static i;
i = -1;
while(i <= get_maxplayers())
{
if(is_user_connected(++i))
{
return i;
}
}
return -1;
}
Anyways, if the author might come active again: There's still a random 'No stats bug' which
appears once in a while (mostly while jumping on block). Hope someone is able to fix that random bug.
|
For now, it seems like this is the way to go, and I've done what is mentioned up here, Thanks for your post wAyz. Hope this will be my final edit.
Regards
__________________
Last edited by ZEDD_Intensity; 12-05-2017 at 19:31.
Reason: testing a solution
|
|