Проблема с работой ReZombiePlague

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
49
Реакции
32
Ошибка
L 11/01/2021 - 22:12:27: [ReAPI] set_member_s: 'm_bSkipShowMenu' has no refs to the base class of an entity 'player'
L 11/01/2021 - 22:12:27: [AMXX] Displaying debug trace (plugin "rezp/menus/rz_menu_join_human.amxx", version "1.0.0")
L 11/01/2021 - 22:12:27: [AMXX] Run time error 10: native error (native "set_member_s")
L 11/01/2021 - 22:12:27: [AMXX] [0] rz_menu_join_human.sma::@HandleMenu_ChooseTeam_Pre (line 154)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5293 (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: Oct 7 2021 17:13:53
Built from: https://github.com/alliedmodders/amxmodx/commit/8e8dfa3
Build ID: 5293:8e8dfa3
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.767-dev
Build date: 03:13:55 Oct 25 2021 (2753)
Build from: https://github.com/dreamstalker/rehlds/commit/471158b
ReGamedll
ReGameDLL version: 5.21.0.540-dev
Build date: 17:33:16 Oct 25 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/b9cccc6
Версия Metamod
Metamod-r v1.3.0.84, API (5:13)
Metamod-r build: 20:03:02 Jul 31 2017
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/a6ab7ce
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.92d ini Start Never
[ 3] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl1 ANY ANY
[ 4] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl1 ANY ANY
[ 5] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl1 ANY ANY
[ 6] ReAPI RUN - reapi_amxx_i386. v5.21.0. pl1 ANY Never
6 plugins, 6 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Admin Base 1.9.0.5293 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5293 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5293 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5293 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5293 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5293 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5293 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5293 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5293 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5293 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5293 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5293 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5293 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0.5293 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0.5293 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5293 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5293 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5293 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5293 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5293 AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.9.0.5293 AMXX Dev Team statsx.amxx running
[ 22] [ReZP] Main 1.0.0 fl0wer rezp/rz_main.am running
[ 23] [ReZP] Game Rules 1.0.0 fl0wer rezp/rz_gamerul running
[ 24] [ReZP] Game Mode 1.0.0 fl0wer rezp/rz_gamemod running
[ 25] [ReZP] Weapons 1.0.0 fl0wer rezp/rz_weapons running
[ 26] [ReZP] Items 1.0.0 fl0wer rezp/rz_items.a running
[ 27] [ReZP] Player 1.0.0 fl0wer rezp/rz_player. running
[ 28] [ReZP] Player: Class 1.0.0 fl0wer rezp/rz_player_ running
[ 29] [ReZP] Player: Subclas 1.0.0 fl0wer rezp/rz_player_ running
[ 30] [ReZP] Player: Propert 1.0.0 fl0wer rezp/rz_player_ running
[ 31] [ReZP] Player: Models 1.0.0 fl0wer rezp/rz_player_ running
[ 32] [ReZP] Player: Sounds 1.0.0 fl0wer rezp/rz_player_ running
[ 33] [ReZP] Player: Melee 1.0.0 fl0wer rezp/rz_player_ running
[ 34] [ReZP] Player: Night V 1.0.0 fl0wer rezp/rz_player_ running
[ 35] [ReZP] Game Mode: Mult 1.0.0 fl0wer rezp/gamemodes/ running
[ 36] [ReZP] Game Mode: Swar 1.0.0 fl0wer rezp/gamemodes/ running
[ 37] [ReZP] Game Mode: Neme 1.0.0 fl0wer rezp/gamemodes/ running
[ 38] [ReZP] Game Mode: Surv 1.0.0 fl0wer rezp/gamemodes/ running
[ 39] [ReZP] Game Mode: Plag 1.0.0 fl0wer rezp/gamemodes/ running
[ 40] [ReZP] Game Mode: Assa 1.0.0 fl0wer rezp/gamemodes/ running
[ 41] [ReZP] Game Mode: Snip 1.0.0 fl0wer rezp/gamemodes/ running
[ 42] [ReZP] Game Mode: Arma 1.0.0 fl0wer rezp/gamemodes/ running
[ 43] [ReZP] Game Mode: Assa 1.0.0 fl0wer rezp/gamemodes/ running
[ 44] [ReZP] Class: Zombie 1.0.0 fl0wer rezp/classes/rz running
[ 45] [ReZP] Class: Human 1.0.0 fl0wer rezp/classes/rz running
[ 46] [ReZP] Class: Nemesis 1.0.0 fl0wer rezp/classes/rz running
[ 47] [ReZP] Class: Survivor 1.0.0 fl0wer rezp/classes/rz running
[ 48] [ReZP] Class: Assassin 1.0.0 fl0wer rezp/classes/rz running
[ 49] [ReZP] Class: Sniper 1.0.0 fl0wer rezp/classes/rz running
[ 50] [ReZP] Zombie Sub-clas 1.0.0 fl0wer rezp/subclasses running
[ 51] [ReZP] Zombie Sub-clas 1.0.0 fl0wer rezp/subclasses running
[ 52] [ReZP] Zombie Sub-clas 1.0.0 fl0wer rezp/subclasses running
[ 53] [ReZP] Human Sub-class 1.0.0 fl0wer rezp/subclasses running
[ 54] [ReZP] Human Sub-class 1.0.0 fl0wer rezp/subclasses running
[ 55] [ReZP] Grenade: Fire 1.0.0 fl0wer rezp/weapons/rz running
[ 56] [ReZP] Grenade: Frost 1.0.0 fl0wer rezp/weapons/rz running
[ 57] [ReZP] Grenade: Flare 1.0.0 fl0wer rezp/weapons/rz running
[ 58] [ReZP] Grenade: Infect 1.0.0 fl0wer rezp/weapons/rz running
[ 59] [ReZP] Weapon: Sniper 1.0.0 fl0wer rezp/weapons/rz running
[ 60] [ReZP] Item: Madness 1.0.0 fl0wer rezp/items/rz_i running
[ 61] [ReZP] Item: Antidote 1.0.0 fl0wer rezp/items/rz_i running
[ 62] [ReZP] Item: Grenades 1.0.0 fl0wer rezp/items/rz_i running
[ 63] [ReZP] Item: Weapons 1.0.0 fl0wer rezp/items/rz_i running
[ 64] [ReZP] Item: Nightvisi 1.0.0 fl0wer rezp/items/rz_i running
[ 65] [ReZP] Item: Armor 1.0.0 fl0wer rezp/items/rz_i running
[ 66] [ReZP] Menu: Game 1.0.0 fl0wer rezp/menus/rz_m running
[ 67] [ReZP] Menu: Weapons 1.0.0 fl0wer rezp/menus/rz_m running
[ 68] [ReZP] Menu: Extra Ite 1.0.0 fl0wer rezp/menus/rz_m running
[ 69] [ReZP] Menu: Choose Zo 1.0.0 fl0wer rezp/menus/rz_m running
[ 70] [ReZP] Menu: Admin 1.0.0 fl0wer rezp/menus/rz_m running
[ 71] [ReZP] Admin Menu: Res 1.0.0 fl0wer rezp/menus/rz_m running
[ 72] [ReZP] Admin Menu: Gam 1.0.0 fl0wer rezp/menus/rz_m running
[ 73] [ReZP] Admin Menu: Cha 1.0.0 fl0wer rezp/menus/rz_m running
[ 74] [ReZP] Menu: Instant C 1.0.0 fl0wer rezp/menus/rz_m running
[ 75] [ReZP] Join Menu: Huma 1.0.0 fl0wer rezp/menus/rz_m debug
[ 76] [ReZP] Addon: Round No 1.0.0 fl0wer rezp/addons/rz_ running
[ 77] [ReZP] Addon: Respawn 1.0.0 fl0wer rezp/addons/rz_ running
[ 78] [ReZP] Addon: Awards 1.0.0 fl0wer rezp/addons/rz_ running
[ 79] [ReZP] Addon: Player I 1.0.0 fl0wer rezp/addons/rz_ running
[ 80] [ReZP] Addon: Status B 1.0.0 fl0wer rezp/addons/rz_ running
[ 81] [ReZP] Addon: Buy Ammo 1.0.0 fl0wer rezp/addons/rz_ running
[ 82] [ReZP] Addon: Humam Fl 1.0.0 fl0wer rezp/addons/rz_ running
[ 83] [ReZP] Addon: Bleeding 1.0.0 fl0wer rezp/addons/rz_ running
83 plugins, 83 running
Автор плагина
fl0wer
Версия плагина
1.0.0
Исходный код
#pragma semicolon 1

#include <amxmodx>
#include <reapi>
#include <rezp>
#include <rezp_util>

const SUBCLASS_MAX_PAGE_ITEMS = 7;

new g_iMenuPage[MAX_PLAYERS + 1];
new Array:g_aMenuItems[MAX_PLAYERS + 1];

new g_iClass_Human;

new mp_auto_join_team;

public plugin_precache()
{
register_plugin("[ReZP] Join Menu: Human Subclasses", REZP_VERSION_STR, "fl0wer");

for (new i = 1; i <= MaxClients; i++)
g_aMenuItems[i] = ArrayCreate(1, 0);
}

public plugin_init()
{
register_clcmd("jointeam", "@Command_JoinCmd");
register_clcmd("joinclass", "@Command_JoinCmd");
register_clcmd("chooseteam", "@Command_ChooseTeam");

RegisterHookChain(RG_ShowVGUIMenu, "@ShowVGUIMenu_Pre", false);
RegisterHookChain(RG_ShowVGUIMenu, "@ShowVGUIMenu_Post", true);
RegisterHookChain(RG_HandleMenu_ChooseTeam, "@HandleMenu_ChooseTeam_Pre", false);

bind_pcvar_num(get_cvar_pointer("mp_auto_join_team"), mp_auto_join_team);

g_iClass_Human = rz_class_find("human");
}

public client_putinserver(id)
{
g_iMenuPage[id] = 0;
}

@Command_JoinCmd(id)
{
return PLUGIN_HANDLED;
}

@Command_ChooseTeam(id)
{
if (is_nullent(id))
return PLUGIN_CONTINUE;

if (get_member(id, m_iJoiningState) == JOINED)
return PLUGIN_CONTINUE;

SubclassSelectMenu_Show(id);
return PLUGIN_HANDLED;
}

@ShowVGUIMenu_Pre(id, VGUIMenu:menuType, bitsSlots, oldMenu[])
{
if (mp_auto_join_team)
return HC_CONTINUE;

switch (menuType)
{
case VGUI_Menu_Team:
{
set_member(id, m_bForceShowMenu, true);
SubclassSelectMenu_Show(id, g_iMenuPage[id]);
return HC_SUPERCEDE;
}
case VGUI_Menu_Class_T, VGUI_Menu_Class_CT:
{
set_member(id, m_bForceShowMenu, true);
}
}

return HC_CONTINUE;
}

@ShowVGUIMenu_Post(id, VGUIMenu:menuType, bitsSlots, oldMenu[])
{
if (mp_auto_join_team)
return;

if (menuType == VGUI_Menu_Class_T || menuType == VGUI_Menu_Class_CT)
{
RequestFrame("@RequestFrame_ChooseApp", id);
}
}

@RequestFrame_ChooseApp(id)
{
if (!is_user_connected(id))
return;

set_member(id, m_iMenu, Menu_ChooseAppearance);
engclient_cmd(id, "menuselect", "0");
}

@HandleMenu_ChooseTeam_Pre(id, MenuChooseTeam:slot)
{
if (mp_auto_join_team)
return HC_CONTINUE;
if (is_user_bot(id))
return HC_CONTINUE;

new itemNum = ArraySize(g_aMenuItems[id]);
new key = any:slot - 1;

if (key == 9)
{
new subclass = ArrayGetCell(g_aMenuItems[id], random_num(0, itemNum - 1));

rz_subclass_player_set_chosen(id, g_iClass_Human, subclass);
}
else
{
if (itemNum < 10)
{
new subclass = ArrayGetCell(g_aMenuItems[id], key);

rz_subclass_player_set_chosen(id, g_iClass_Human, subclass);
}
else
{
switch (key)
{
case 7:
{
g_iMenuPage[id]++;
SetHookChainReturn(ATYPE_INTEGER, false);
return HC_SUPERCEDE;
}
case 8:
{
g_iMenuPage[id]--;
SetHookChainReturn(ATYPE_INTEGER, false);
return HC_SUPERCEDE;
}
default:
{
new subclass = ArrayGetCell(g_aMenuItems[id], g_iMenuPage[id] * SUBCLASS_MAX_PAGE_ITEMS + key);

rz_subclass_player_set_chosen(id, g_iClass_Human, subclass);
}
}
}
}

set_member(id, m_bSkipShowMenu, true);
SetHookChainArg(2, ATYPE_INTEGER, MenuChoose_CT);
return HC_CONTINUE;
}

SubclassSelectMenu_Show(id, page = 0)
{
ArrayClear(g_aMenuItems[id]);

new subclassStart = rz_subclass_start();
new subclassSize = rz_subclass_size();

for (new i = subclassStart; i < subclassStart + subclassSize; i++)
{
if (rz_subclass_get_class(i) != g_iClass_Human)
continue;

if (rz_subclass_player_get_status(id, i) >= RZ_BREAK)
continue;

ArrayPushCell(g_aMenuItems[id], i);
}

new itemNum = ArraySize(g_aMenuItems[id]);

if (itemNum <= 1)
return false;

new bool:singlePage = bool:(itemNum < 10);
new itemPerPage = singlePage ? 9 : SUBCLASS_MAX_PAGE_ITEMS;
new i = min(page * itemPerPage, itemNum);
new start = i - (i % itemPerPage);
new end = min(start + itemPerPage, itemNum);

g_iMenuPage[id] = start / itemPerPage;

new keys;
new len;
new index;
new item;
new text[MAX_MENU_LENGTH];
new name[32];
new desc[64];

SetGlobalTransTarget(id);

rz_class_get_name_langkey(g_iClass_Human, name, charsmax(name));

if (singlePage)
add_formatex("\y%l^n^n", "RZ_SELECT_SUBCLASS", name);
else
add_formatex("\y%l \r%d/%d^n^n", "RZ_SELECT_SUBCLASS", name, g_iMenuPage[id] + 1, ((itemNum - 1) / itemPerPage) + 1);

for (i = start; i < end; i++)
{
index = ArrayGetCell(g_aMenuItems[id], i);

rz_subclass_get_name_langkey(index, name, charsmax(name));
rz_subclass_get_desc_langkey(index, desc, charsmax(desc));

if (rz_subclass_player_get_status(id, index) == RZ_CONTINUE)
{
add_formatex("\r%d. \w%l \d%l^n", item + 1, name, desc);
keys |= (1<<item);
}
else
add_formatex("\d%d. %l %l^n", item + 1, name, desc);

item++;
}

if (!singlePage)
{
for (i = item; i < SUBCLASS_MAX_PAGE_ITEMS; i++)
add_formatex("^n");

if (end < itemNum)
{
add_formatex("^n\r8. \w%l", "RZ_NEXT");
keys |= MENU_KEY_8;
}
else
add_formatex("^n\d8. %l", "RZ_NEXT");

if (g_iMenuPage[id])
{
add_formatex("^n\r9. \w%l", "RZ_BACK");
keys |= MENU_KEY_9;
}
else
add_formatex("^n\d9. %l", "RZ_BACK");
}

add_formatex("^n\r0. \w%l^n", "RZ_AUTOSELECT");
keys |= MENU_KEY_0;

show_menu(id, keys, text);
set_member(id, m_iMenu, Menu_ChooseTeam);
return true;
}
Перекомпилировал плагин, всего лишь добавив в HandleMenu_ChooseTeam_Pre
Код:
if (is_user_bot(id))
        return HC_CONTINUE;
Так как при коннекте ботов, выдавалась ошибка, но теперь стала появляться другая ошибка, которая ввела меня в ступор. Первый раз вижу такое с реапи, причем, в reapi_gamedll_const.inc имеется член m_bSkipShowMenu
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
В инклуде надо убрать принудительное использование safe мемберов
 
  • Нравится
Реакции: Ayk
Сообщения
49
Реакции
32
Nordic Warrior, это может в последствии повлиять на стабильность сервера?
 
Сообщения
49
Реакции
32
Nordic Warrior, попробовал, спасибо, действительно помогло. А можно попросить вас подробнее рассказать, с чем связано такое проявление? У Safe мемберов не хватает некоторых членов, которые используются в обычных? Или почему именно так происходит?
 
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
UrShade, потому что здесь, в отличии от обычного get_member, проверяется на соответствие класс энтити и используемый мембер.
 
  • Нравится
Реакции: Ayk
Сообщения
41
Реакции
7
Ребят,понимаю тема старая и все же. Я многое не знаю и с помощь вас я начинаю по немногу разбираться в ошибках. Я не понимал как убрать "принудительное использование safe мемберов"
Напишу сюда чуть более проще (может кому-то так же помогу, как подсказали мне ибо я нуб) не кидайтесь пожалуйста кирпичами))

Необходимо в include reapi найти закомментировать "#if !defined(MEMBER_UNSAFE)"
bandicam 2023-02-28 13-49-53-413.jpg
после заново скомпилировать ваш плагин.
спасибо Nordic Warrior!
 
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
ReHLRSPEREC, если надо отключить безопасные мемберы только для одного конкретного плагина, то следует добавить #define MEMBER_UNSAFE в этом плагине выше, чем #include reapi
 
Сообщения
41
Реакции
7
Nordic Warrior,
bandicam 2023-02-28 21-09-21-795.jpg
Дополнение: ошибка ушла.Спасибо всем!)
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.

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

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