> > > > >

Ошибка в плагине (cs_get_user_team)

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
102
Рейтинг
18
#1
Ошибка
L 03/11/2018 - 23:50:11: [CSTRIKE] Player out of range (0)
L 03/11/2018 - 23:50:11: [AMXX] Displaying debug trace (plugin "KnifeDuels.amxx", version "2.0.5")
L 03/11/2018 - 23:50:11: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 03/11/2018 - 23:50:11: [AMXX] [0] KnifeDuels.sma::check_teams (line 1964)
L 03/11/2018 - 23:50:11: [AMXX] [1] KnifeDuels.sma::Player_Killed (line 1723)
C++
ОС
Linux
Билд
16:35:42 Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.3.0.592-dev
Build date: 11:22:29 Aug 24 2017 (1230)
Build from: https://github.com/dreamstalker/rehlds/commit/4246a44
C++
ReGamedll
16:35:51 ReGameDLL version: 5.3.0.221-dev
Build date: 17:13:45 Aug 19 2017
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/462dc99
C++
Список метамодулей
[ 1] Reunion          RUN   -    reunion_mm_i386.  v0.1.75   ini   Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 3] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 4] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-d ini Start ANY
[ 5] Rechecker RUN - rechecker_mm_i38 v2.3 ini Chlvl ANY
[ 6] ReParachute RUN - parachute_amxx_i v1.1 Bet pl4 ANY ANY
[ 7] hackdetector RUN - hackdetector_amx v0.15.32 pl4 ANY ANY
[ 8] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl4 ANY ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.8.3-R pl4 ANY ANY
[10] Engine RUN - engine_amxx_i386 v1.8.3-d pl4 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-d pl4 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.8.3-d pl4 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-d pl4 ANY ANY
[14] MySQL RUN - mysql_amxx_i386. v1.8.3-d pl4 ANY ANY
[15] VTC AMXX API RUN - VtcApi_amxx_i386 v2017 RC pl4 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386. v5.1.0.1 pl4 ANY Never
[17] GeoIP RUN - geoip_amxx_i386. v1.8.3-d pl4 ANY ANY
17 plugins, 17 running
C++
Список плагинов
[  1] FreshBans               1.3.8b      kanagava          fresh_bans_138_  running  
[ 2] Admin Loader 2.6.2 neygomon admin_loader.am running
[ 3] Anticheat 3.1.6 ctr52 anticheat.amxx running
[ 4] Knife DeathMatch 1.1 Lucky knifedm.amxx running
[ 5] Nextmap Chooser 1.8.3-Re AMXX Dev Team mapchooser.amxx running
[ 6] RC BaseChanger freesrv custom rc_basechanger. stopped
[ 7] Ping Control 1.31 neygomon Ping_Control.am running
[ 8] SpacePK.ru DM BlockRad 1.0 You? blockradio.amxx running
[ 9] Custom Models 1.3.2 neugomon custom_models.a running
[ 10] Block Change Name 1.0 DJ_WEST block_change_na running
[ 11] MG Grab 1.0 Nickron mg_grab.amxx running
[ 12] ReChecker Logging freesrv custom rc_logging.amxx running
[ 13] HATS 0.2 SgtBane Hats02.amxx running
[ 14] AFK Control 1.4.1 [NoR neygomon afk_control.amx running
16:36:22 [ 15] BhopHack Detector 0.1 Mistrick bhophack_detect running
[ 16] Lite Hook 1.0 OverGame lite_hook.amxx running
[ 17] Players Menu 1.3.2 neugomon players_menu.am running
[ 18] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 19] Sky change helper 0.1 AMXX.Shop sky_change_help running
[ 20] Advanced Experience Sy 0.4 serfreeman1337 aes_main.amxx running
[ 21] Advert Messages 1.22 neygomon adverts.amxx running
[ 22] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 23] Anti DD Scroll 1.0 Empower anti_dd_scroll. running
[ 24] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 25] Train Killer 1.0 Pastout! trainkiller.amx running
[ 26] Chat Logger 2.1a Jim chat_logger.amx running
[ 27] Spray Block 1.0 maFFyoZZyk Spray_Block.amx running
[ 28] AES: StatsX 0.2 serfreeman1337 aes_statsx_cstr running
[ 29] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
16:36:22 [ 30] Aliases checker 1.0.3 kanagava alias_detector- running
[ 31] Admin Chat 1.8.3-Re AMXX Dev Team adminchat.amxx running
[ 32] Camera Changer 1.3 Bl0ck Camera_Changer. running
[ 33] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 34] Menus Front-End 1.5 untest neugomon menufront_end.a running
[ 35] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 36] Teleport Menu 1.8.3-Re AMXX Dev Team telemenu.amxx running
[ 37] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 38] StatsX 1.8.3-Re AMXX Dev Team statsx.amxx running
[ 39] CS Stats Logging 1.8.3-Re AMXX Dev Team stats_logging.a running
[ 40] CS Misc. Stats 1.8.3-Re AMXX Dev Team miscstats.amxx running
[ 41] plugin_trail 1.3.1 Bahrmanou plugin_trail.am running
[ 42] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 43] Knife Duels 2.0.5 Adrenaline's Wra KnifeDuels.amxx debug
[ 44] AES: Exp CSTRIKE 0.3 serfreeman1337 aes_exp_cstrike running
16:36:22 [ 45] AES: Informer 0.2 serfreeman1337 aes_informer.am running
[ 46] AES: Experience Editor 0.1 serfreeman1337 aes_exp_editor. running
[ 47] AES: Bonus System 0.2 serfreeman1337 aes_bonus_syste running
[ 48] AES: Bonus CSTRIKE 0.4 serfreeman1337 aes_bonus_cstri running
48 plugins, 47 running
Список модулей
[ 1] ReParachute             1.1 Beta    the_hunter           running    
[ 2] hackdetector 0.15.328.l AGHL.RU Dev Team running
[ 3] CStrike 1.8.3-Re AMX Mod X Dev Team running
[ 4] CSX 1.8.3-Re AMX Mod X Dev Team running
[ 5] Engine 1.8.3-dev+ AMX Mod X Dev Team running
[ 6] FakeMeta 1.8.3-dev+ AMX Mod X Dev Team running
[ 7] Fun 1.8.3-dev+ AMX Mod X Dev Team running
[ 8] Ham Sandwich 1.8.3-dev+ AMX Mod X Dev Team running
[ 9] nVault 1.8.3-dev+ AMX Mod X Dev Team running
[10] MySQL 1.8.3-dev+ AMX Mod X Dev Team running
[11] VTC AMXX API 2017 RC WPMG.PRoSToC0der running
[12] ReAPI 5.1.0.103- Asmodai & s1lent running
[13] GeoIP 1.8.3-dev+ AMX Mod X Dev Team running
[14] Sockets 1.8.3-dev+ AMX Mod X Dev Team running
[15] RegEx 1.8.3-dev+ AMX Mod X Dev Team running
15 modules, 15 correct
C++
Исходник
/* Plugin generated by AMXX-Studio */



#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <fun>
#include <engine>
#include <xs>
#include <fun>
#include <colorchat>
#include <dhudmessage>
C++
Критична ли эта ошибка? И можно ее как-то исправить?
 
В этой теме было размещено решение! Перейти к решению.

Вложения

 
Сообщения
256
Рейтинг
201
#2
У тебя плагин вообще компилируется? С компилятором AMXX 1.8.3-dev это невозможно скомпилировать. Для правильной компиляции, нужно удалить эти два include.
Код:
#include <colorchat>
#include <dhudmessage>
После этого, ищем в коде MAX_PLAYERS и меняем на g_iMaxPlayers все результаты.
Далее, заменяем public client_disconnect(id) на public client_disconnected(id) во избежание предупреждения warning 233: symbol "client_disconnect" is marked as deprecated: Use client_disconnected() instead.
 
 
Сообщения
256
Рейтинг
201
#4
Minni, если оставить как есть будет выдавать две ошибки и одно предупреждение:
Код:
(124) : error 020: invalid symbol name ""
(164) : error 022: must be lvalue (non-constant)
(124) : warning 203: symbol is never used: ""
Если не хочется менять на g_iMaxPlayers то можно заменить new MAX_PLAYERS,map_name[48] на new map_name[48] и удалить MAX_PLAYERS = get_maxplayers();
Конечно же, этого не стоит делать, следует использовать вариант что в сообщении #2.
14 Мар 2018
А так же, следует прочитать описание MAX_PLAYERS:
Код:
/**
* Defines and constants related to the maximum number of clients.
*
* @note  MAX_PLAYERS is not the same as MaxClients. MAX_PLAYERS is a hardcoded
*        value as an upper limit, used mainly to declare arrays big enough for
*        all possible server situations. MaxClients changes based on the
*        server the plugin is deployed on..
*/
#define MAX_PLAYERS 32 /* Maximum number of players AMX Mod X supports */
 
Последнее редактирование:
 
Сообщения
1.288
Рейтинг
711
#5
g_iMaxPlayers... get_maxplayers()...
Нафига оно тебе нужно? Есть же MaxClients.
 
  1
Сообщения
1.639
GitHub
wopox1337
Рейтинг
1134
#9
w0w, вот именно для таких случаев и юзают макросы и условия препроцессора.
 
  1
Сообщения
102
Рейтинг
18
#10
w0w, сделал как ты написал, теперь такая ошибка

L 03/15/2018 - 17:28:09: [CSTRIKE] Player out of range (0)
L 03/15/2018 - 17:28:09: [AMXX] Displaying debug trace (plugin "KnifeDuels.amxx", version "2.0.5")
L 03/15/2018 - 17:28:09: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 03/15/2018 - 17:28:09: [AMXX] [0] KnifeDuels.sma::check_teams (line 1964)
L 03/15/2018 - 17:28:09: [AMXX] [1] KnifeDuels.sma::Player_Killed (line 1723)
 
 
Сообщения
256
Рейтинг
201
#11
Angerfist, прикрепи к сообщению исходник того что получилось.
 
 
Статус
В этой теме нельзя размещать новые ответы.

Похожие темы

> > > > >