Ошибка в логах Chat Colour Menu (Тема 2 )

Сообщения
80
Реакции
24
Ошибка
L 09/30/2019 - 06:39:35: [AMXX] Displaying debug trace (plugin "colourmenu.amxx", version "1.50")
L 09/30/2019 - 06:39:35: [AMXX] Run time error 10: native error (native "query_client_cvar")
L 09/30/2019 - 06:39:35: [AMXX] [0] colourmenu.sma::taskColours (line 253)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5249 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jun 19 2019 13:31:53
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34
Build ID: 5249:6cecb34
Core mode: JIT+ASM32
Билд
ReHLDS version: 3.4.0.639-dev
Build date: 17:47:13 Feb 21 2018 (1411)
Build from: https://github.com/dreamstalker/rehlds/commit/822df9a
ReGamedll
ReGameDLL version: 5.11.0.397-dev
Build date: 17:33:24 Sep 4 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/8ec88f8
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
description      stat pend  file                      vers             src  load  unload
[ 1] VoiceTranscoder RUN - vtc.so v2017RC3 ini ANY ANY
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5241 ini Start ANY
[ 3] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 4] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 5] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 7] Fun RUN - fun_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[ 8] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[10] Engine RUN - engine_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[12] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[14] MySQL RUN - mysql_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[15] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5241 pl2 ANY ANY
[16] VTC AMXX API RUN - VtcApi_amxx_i386.so v2017 RC2 pl2 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386.so v5.10.0.188-dev pl2 ANY Never
17 plugins, 17 running
Список плагинов
name                    version     author            file             status   
[ 1] [183] AMXBans RBS 18.10.13 SKAJIbnEJIb & La amxbans_rbs.amx running
[ 2] [183] Cvar on Map 18.05.29 SKAJIbnEJIb cvar_on_map.amx running
[ 3] [183] MapChooser RBS 18.10.05 SKAJIbnEJIb & UF mapchooser_rbs. running
[ 4] [183] NextMap 18.09.25 SKAJIbnEJIb & AM nextmap.amxx running
[ 5] [183] TimeLeft 18.09.25 SKAJIbnEJIb & AM timeleft.amxx running
[ 6] HLDS Weapon FIX 1.1 [WPMG]PRoSToTeM@ hldsweaponfix.a running
[ 7] VTB 3.0 MOD voteban.amxx running
[ 8] [183] Skill ELO 19.09.06 SKAJIbnEJIb skill_elo.amxx running
[ 9] Menus Front-End 18.12.18 AMXX Dev Team & amxmodmenu_rbs. running
[ 10] [183] AdminCmd RBS 19.02.22 AMXX Dev Team & admincmd_rbs.am running
[ 11] Commands Menu 1.9.0.5241 AMXX Dev Team cmdmenu.amxx running
[ 12] [183] MapsMenu RBS 19.09.01 SKAJIbnEJIb & AM mapsmenu_rbs.am running
[ 13] Admin Chat 1.9.0.5241 AMXX Dev Team adminchat.amxx running
[ 14] Scrolling Message 1.9.0.5241 AMXX Dev Team scrollmsg.amxx running
[ 15] Info. Messages 1.9.0.5241 AMXX Dev Team imessage.amxx running
[ 16] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx running
[ 17] MultiJump 1.1 twistedeuphoria multijump.amxx running
[ 18] AMXX Gag 1.3 xPaw & Exolent gagmenu.amxx running
[ 19] [183] BonusMenu RBS 18.08.06BE SKAJIbnEJIb bonusmenu_rbs.a running
[ 20] [183] Army Ranks Ultim 19.09.05BE SKAJIbnEJIb army_ranks_ulti running
[ 21] [183] Chat RBS 19.08.01 SKAJIbnEJIb chat_rbs.amxx running
[ 22] [183] Chat Addons 19.08.01 SKAJIbnEJIb chat_addons.amx running
[ 23] [183] Stats Configurat 18.05.15 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 24] [183] StatsX RBS 19.08.28 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 25] [183] CsStats MySQL 19.08.27 SKAJIbnEJIb csstats_mysql.a running
[ 26] [183] AR Vampire 17.08.22 SKAJIbnEJIb ar_vampire.amxx running
[ 27] [183] No Team Flash 17.10.30 SKAJIbnEJIb NoTeamFlash.amx running
[ 28] [183] Ultimate Flags 18.12.16 SKAJIbnEJIb ultimate_flags. running
[ 29] [183] Stimulation RBS 18.08.08BE SKAJIbnEJIb stimulation_rbs running
[ 30] [183] BonusTime RBS 18.10.10 SKAJIbnEJIb bonustime_rbs.a running
[ 31] [183] Ultimate Weapons 18.08.08BE SKAJIbnEJIb ultimate_weapon running
[ 32] [183] Top Award RBS 19.08.28 SKAJIbnEJIb topaward_rbs.am running
[ 33] [183] AC Spectator ESP 17.08.09 SKAJIbnEJIb & Ko ac_esp.amxx running
[ 34] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 35] [183] Damager RBS 19.08.30 SKAJIbnEJIb damager_rbs.amx running
[ 36] [183] CsStats ResetSco 18.03.24 SKAJIbnEJIb csstats_resetsc running
[ 37] Admin Check 1.51 OneEyed admin_check.amx running
[ 38] Chat Colour Menu 1.50 shadow.hk colourmenu.amxx running
[ 39] Ultimate Sounds 1.7 Dizzy / Bmann_42 ultimate_sounds running
[ 40] Hide 'Fire in the hole 1.1 xPaw & SKAJIbnEJ hide_fith.amxx running
[ 41] [183] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 42] Weapons MaxClip 0.3.0 ConnorMcLeod weapons_maxclip running
[ 43] Smoke FIX 0.1 many Smoke_FIX.amxx running
[ 44] Silly C4 1.1 Cheap_Suit sillyc4.amxx running
[ 45] [183] Screen Player 19.02.22 SKAJIbnEJIb screen_player.a running
[ 46] Weaponmenu 1.0 UNREAL weaponmenu_new. running
[ 47] GHW Auto Message Displ 2.1 GHW_Chronic reklama.amxx running
[ 48] Bomb Timer 3.2 Twe3k plent_bomb.amxx running
[ 49] [183] AfkKicker RBS 19.08.28 SKAJIbnEJIb afkkicker_rbs.a running
[ 50] [183] Ultimate Knife 19.08.30 SKAJIbnEJIb ultimate_knife. running
[ 51] Map Spawns Editor 1.0.16 iG_os Map_Spawns_Edit running
[ 52] MultiManager Fix 1.5 Asmodai & UFPS.T multimanager_fi running
[ 53] No Name Change 0.1.1 VEN no_name_change. running
[ 54] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 55] Permanent message 1.1 He3aBuCuM permanent_messa running
[ 56] [183] SlayLosers RBS 19.09.02 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 57] [183] VoteRR RBS 17.08.11 kalash1k & SKAJI voterr_rbs.amxx running
[ 58] [183] Spect Bot 17.08.28 SKAJIbnEJIb & Bo SpectBot.amxx running
[ 59] [ReAPI] IDEAL VIP 1.4.6 host-v.ru VIP.amxx running
[ 60] Join_Music 1.2.3 White Panther join.amxx running
[ 61] Mode 2x2 2.5re s1lent mode.amxx running
[ 62] ComboSprites 0.5 Chrescoe1 combo_sprtes.am running
[ 63] Death Sprite 1.0 DarkGL skull.amxx running
[ 64] Flashbang Dynamic Ligh 0.21 Avalanche flashbang_dligh running
[ 65] Kill Effect 0.2 neugomon kill_effect.amx running
[ 66] [183] Servers List 17.10.30 Sho0ter & SKAJIb servers_list.am running
[ 67] Slots Reservation 1.9.0.5241 AMXX Dev Team adminslots.amxx running
[ 68] Team Grenade Trail 1.2 Numb grenadetrail.am running
[ 69] Colors Menu 1.5 host-v.ru color.amxx running
[ 70] [ZL] CoreFunction 2.0.2 Alexander.3 zl_core.amxx running
[ 71] ScorpionBoss 1.0.1 Alexander.3 zl_boss_scorpio stopped
71 plugins, 70 running
Автор плагина
shadow.hk
Версия плагина
1.50
Исходный код
#pragma semicolon 1

// Includes
////////////

#include <amxmodx>
#include <amxmisc>

// Defines
////////////

#define MAX_PLAYERS 32

// Arrays
////////////

new Array:g_aColourName;
new Array:g_aColourSettings;

// Integers
////////////

new g_iColour[MAX_PLAYERS+1][3];
new g_iCustomColour[MAX_PLAYERS+1][3];

new g_iTemp[MAX_PLAYERS+1];
new g_iMenuPage[MAX_PLAYERS+1];

new g_iMaxColours;

//////////////////////////////////////////////////////////////
// Plugin Forwards //
//////////////////////////////////////////////////////////////

public plugin_init()
{
register_plugin("Chat Colour Menu", "1.50", "shadow.hk");

register_dictionary("common.txt");
register_dictionary("colourmenu.txt");

register_clcmd("say /colour", "ColourMenu");
register_clcmd("say colour", "ColourMenu");

register_clcmd("colour_value", "cmdColourValue", -1, "<value>");

register_menucmd(register_menuid("Chat Colour Menu"), 1023, "ColourMenu_handler");
register_menucmd(register_menuid("Custom Colour Menu"), 1023, "CustomMenu_handler");
}

public plugin_cfg()
{
g_aColourName = ArrayCreate(32);
g_aColourSettings = ArrayCreate(3);

new configsdir[32], file[64];
get_configsdir(configsdir, 31);
format(file, 63, "%s/colours.ini", configsdir);

LoadFile(file);
}

//////////////////////////////////////////////////////////////
// Client Forwards //
//////////////////////////////////////////////////////////////

public client_putinserver(id)
{
g_iCustomColour[id] = { 0, 0, 0 };
if(!is_user_bot(id) && !is_user_hltv(id))
set_task(0.5, "taskColours", id);
}

public client_disconnected(id)
{
remove_task(id);
}

//////////////////////////////////////////////////////////////
// Commands //
//////////////////////////////////////////////////////////////

public cmdColourValue(id)
{
new szArg[4];
read_argv(1, szArg, 3);

if( !is_str_num(szArg) )
{
return PLUGIN_HANDLED;
}

g_iCustomColour[id][g_iTemp[id]] = clamp(str_to_num(szArg), 0, 255);

CustomMenu(id);
return PLUGIN_HANDLED;
}

//////////////////////////////////////////////////////////////
// Menus & Menu Handlers //
//////////////////////////////////////////////////////////////

// taken from alka's voteban source code
public ColourMenu(id, iPos)
{
static i, iKeys, szMenu[512], iCurrPos;
iCurrPos = 0;

static iStart, iEnd;
iStart = iPos * 6;

static iPages;
iPages = floatround(float(g_iMaxColours) / 6.0, floatround_ceil);

iEnd = iStart + 6;
iKeys = ( MENU_KEY_0 | MENU_KEY_7 | MENU_KEY_8 );

if( iEnd > g_iMaxColours )
{
iEnd = g_iMaxColours;
}

// heading
static iLen;
iLen = formatex(szMenu, sizeof(szMenu) - 1, "\y%L (\w%i/%i\y):^n^n", id, "MENU_COLOUR", g_iMenuPage[id] + 1, iPages);

// colour keys
for(i = iStart; i < iEnd; i++)
{
iKeys |= ( 1<<iCurrPos++ );
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r%d. \w%a^n", iCurrPos, ArrayGetStringHandle(g_aColourName, i));
}

iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "^n\r7. \y%L", id, "MENU_CUSTOM");
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "^n\r8. \y%L^n", id, "COLOUR_DEFAULT");

// forward key
if( iEnd == g_iMaxColours )
{
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "^n\r9. \d%L", id, "MORE");
}
else
{
iKeys |= MENU_KEY_9;
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "^n\r9. \w%L", id, "MORE");
}

// exit key
if( !g_iMenuPage[id] )
{
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "^n\r0. \w%L", id, "EXIT");
}
else
{
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "^n\r0. \w%L", id, "BACK");
}

show_menu(id, iKeys, szMenu, -1, "Chat Colour Menu");
return PLUGIN_HANDLED;
}

public ColourMenu_handler(id, key)
{
switch( key )
{
case 6:
{
CustomMenu(id);
return PLUGIN_HANDLED;
}
case 7:
{
client_cmd(id, "con_color ^"%i %i %i^"", g_iColour[id][0], g_iColour[id][1], g_iColour[id][2]);
client_print(id, print_chat, "[Сервер] %L %L", id, "COLOUR_SET", id, "COLOUR_DEFAULT");
}
case 8: ++g_iMenuPage[id];
case 9:
{
if( !g_iMenuPage[id] )
{
return PLUGIN_HANDLED;
}

--g_iMenuPage[id];
}
default:
{
static colour, colours[3];
colour = ( g_iMenuPage[id] * 6 + key );

ArrayGetArray(g_aColourSettings, colour, colours);

client_cmd(id, "con_color ^"%i %i %i^"", colours[0], colours[1], colours[2]);
client_print(id, print_chat, "[Сервер] %L %a", id, "COLOUR_SET", ArrayGetStringHandle(g_aColourName, colour));
}
}

ColourMenu(id, g_iMenuPage[id]);
return PLUGIN_HANDLED;
}

public CustomMenu(id)
{
new iLen, szMenu[256], iKeys;
iKeys = ( MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_8 | MENU_KEY_9 );

iLen = formatex(szMenu, sizeof(szMenu) - 1, "\y%L:^n^n", id, "MENU_CUSTOM");

iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r1. \w%L: \y%i^n", id, "RED", g_iCustomColour[id][0]);
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r2. \w%L: \y%i^n", id, "GREEN", g_iCustomColour[id][1]);
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r3. \w%L: \y%i^n^n", id, "BLUE", g_iCustomColour[id][2]);

iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r8. \y%L^n", id, "CUSTOM_SET");
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r9. \w%L^n", id, "BACK");
iLen += formatex(szMenu[iLen], sizeof(szMenu) - 1 - iLen, "\r0. \w%L", id, "EXIT");

show_menu(id, iKeys, szMenu, -1, "Custom Colour Menu");
return PLUGIN_HANDLED;
}

public CustomMenu_handler(id, key)
{
switch( key )
{
case 0, 1, 2:
{
g_iTemp[id] = key;

client_cmd(id, "messagemode colour_value");
client_print(id, print_chat, "[Сервер] %L", id, "CUSTOM_VALUE");
}

case 7:
{
CustomMenu(id);

client_cmd(id, "con_color ^"%i %i %i^"", g_iCustomColour[id][0], g_iCustomColour[id][1], g_iCustomColour[id][2]);
client_print(id, print_chat, "[Сервер] %L ^"%i %i %i^"", id, "COLOUR_SET", g_iCustomColour[id][0], g_iCustomColour[id][1], g_iCustomColour[id][2]);
}
case 8: ColourMenu(id, g_iMenuPage[id]);
case 9: g_iMenuPage[id] = 0;
}

return PLUGIN_HANDLED;
}

//////////////////////////////////////////////////////////////
// Tasks //
//////////////////////////////////////////////////////////////

public taskColours(id)
{
query_client_cvar(id, "con_color", "fwdConColour");
}

//////////////////////////////////////////////////////////////
// Miscellaneous Forwards //
//////////////////////////////////////////////////////////////

public fwdConColour(id, const cvar[], const value[])
{
new colour[12];
copy(colour, 11, value);

if( contain(colour, "+") != -1 )
{
replace_all(colour, 11, "+", " ");
}

new szData[3][4];
parse(colour, szData[0], 3, szData[1], 3, szData[2], 3);

g_iColour[id][0] = clamp(str_to_num(szData[0]), 0, 255);
g_iColour[id][1] = clamp(str_to_num(szData[1]), 0, 255);
g_iColour[id][2] = clamp(str_to_num(szData[2]), 0, 255);
}

//////////////////////////////////////////////////////////////
// File Data //
//////////////////////////////////////////////////////////////

// Load Colour File
LoadFile(const file[])
{
// Create a default file, if it doesn't exist
if( !file_exists(file) )
{
write_file(file, "; Colours Configuration file^n; Usage: <Colourname> <red> <green> <blue>^n^"CS Default^" 255 180 30");

ArrayPushString(g_aColourName, "CS Default");
ArrayPushArray(g_aColourSettings, { 255, 180, 30 });

g_iMaxColours = 1;

log_amx("%L", LANG_SERVER, "LOG_ERROR");
return;
}

new szLine[64], szData[3][4], szColourName[32], colours[3];

new File = fopen(file, "r");

while( !feof(File) )
{
fgets(File, szLine, 63);
trim(szLine);

if( !szLine[0] || szLine[0] == '^n' || szLine[0] == ';' )
{
continue;
}

parse(szLine, szColourName, 31, szData[0], 3, szData[1], 3, szData[2], 3);

colours[0] = clamp(str_to_num(szData[0]), 0, 255);
colours[1] = clamp(str_to_num(szData[1]), 0, 255);
colours[2] = clamp(str_to_num(szData[2]), 0, 255);

ArrayPushArray(g_aColourSettings, colours);
ArrayPushString(g_aColourName, szColourName);
}

fclose(File);

g_iMaxColours = ArraySize(g_aColourName);

log_amx("%L", LANG_SERVER, "LOG_LOADED", g_iMaxColours);
}
Здравствуйте. Хотелось бы вернутся снова к этому плагину. Предыдущая тема https://dev-cs.ru/threads/7588/ была закрыта создал новую так как походу немного другая ошибка сейчас появилась. Подскажите как исправить?

Так понимаю тут что то не так?

public taskColours(id)
{
query_client_cvar(id, "con_color", "fwdConColour");
}
 
Сообщения
1,419
Реакции
2,508
Помог
59 раз(а)
В прошлой теме подсказали ответ. Пробуем:

Код:
if(!is_user_bot(id) && !is_user_hltv(id))
-set_task(0.5, "taskColours", id);
+    set_task(0.5, "taskColours", id);
Код:
public taskColours(id)
{
-    query_client_cvar(id, "con_color", "fwdConColour");
+    if(is_user_connected(id))
+        query_client_cvar(id, "con_color", "fwdConColour");
}
 

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

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