- Ошибка
-
L 10/02/2020 - 01:37:09: Function "menu1" was not found
L 10/02/2020 - 01:37:09: [AMXX] Displaying debug trace (plugin "menuSystem.amxx", version "0.1.2")
L 10/02/2020 - 01:37:09: [AMXX] Run time error 19: function not found
L 10/02/2020 - 01:37:09: [AMXX] [0] menuSystem.sma::plugin_init (line 22)
- ОС
- Linux
- Amx Mod X
-
AmxModX 1.9.05271
- Билд
-
AMX Mod X 1.9.0.5271 (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 24 2020 13:53:30
Built from: https://github.com/alliedmodders/amxmodx/commit/5eea3e5
Build ID: 5271:5eea3e5
Core mode: JIT+ASM32
- ReGamedll
-
ReGameDLL5.18.0.474version
- Версия Metamod
-
Metamod v1.21p37 2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
- Список метамодулей
-
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 3] ProcessCmds RUN - processcmds_mm_i v1.1.7 ini Start Never
[ 4] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 5] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 7] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 9] VoiceTranscoder RUN - VoiceTranscoder. v2020MA2 ini ANY ANY
[10] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl1 ANY ANY
[11] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl1 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl1 ANY ANY
[13] ReAimDetector RUN - reaimdetector_am v0.2.2 pl1 ANY Never
[14] ReAPI RUN - reapi_amxx_i386. v5.15.0. pl1 ANY Never
[15] Engine RUN - engine_amxx_i386 v1.9.0.5 pl1 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl1 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl1 ANY ANY
[18] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl1 ANY ANY
18 plugins, 18 running
- Список плагинов
-
[ 1] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 2] FreshBans 1.4.3b kanagava fresh_bans.amxx running
[ 3] ScreenMaker 1.1 neygomon screen_maker.am running
[ 4] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 5] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 6] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 10] Ping Control 1.31 neygomon Ping_Control.am running
[ 11] [ReAPI] Flash Control 1.1 neugomon flash_control.a running
[ 12] Auto Team Balance 2.0b MakapoH. auto_team_balan running
[ 13] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 14] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 15] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 16] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 17] Menu System 0.1.2 serfreeman1337 menuSystem.amxx running
- Автор плагина
- by serfreeman1337
- Версия плагина
- Menu System v. 0.1.2
- Исходный код
-
Спойлер: MenuSystem.sma
/*
Menu System v. 0.1.2
by serfreeman1337 http://gf.hldm.org/
*/
#include <amxmodx>
#define PLUGIN "Menu System"
#define VERSION "0.1.2"
#define AUTHOR "serfreeman1337"
new Trie:sayCall
new Trie:cmdCall
enum _:menuItemStruct {
ISTRUCT_TITLE[128],
ISTRUCT_CMD[20]
}
public plugin_init(){
register_plugin(PLUGIN,VERSION,AUTHOR)
register_clcmd("nightvision", "menu1")
register_clcmd("say /help","Show_HelpMOTD")
}
public Show_HelpMOTD(id) {
show_motd(id,"help.txt","HELP")
}
public plugin_cfg(){
new cfgPath[512]
get_localinfo("amxx_configsdir",cfgPath,charsmax(cfgPath))
add(cfgPath,charsmax(cfgPath),"/menuSystem.ini")
new f = fopen(cfgPath,"r")
if(!f){
log_amx("confg file not found")
return PLUGIN_CONTINUE
}
new buffer[512],menuTitle[128],menuId = -1
while(!feof(f)){
fgets(f,buffer,charsmax(buffer))
trim(buffer)
if(!buffer[0] || buffer[0] == ';') // skip comments
continue
replace_all(buffer,charsmax(buffer),"^^n","^n") // do new lines
if(buffer[0] == '[' && buffer[strlen(buffer) - 1] == ']'){ // new menu entrie
formatex(menuTitle,strlen(buffer) - 2,"%s",buffer[1]) // parse menu title
menuId = menu_create(menuTitle,"GlobalMenu_Handler") // create new menu
new itemText[128]
formatex(itemText,charsmax(itemText),"%L",LANG_SERVER,"BACK")
menu_setprop(menuId,MPROP_BACKNAME,itemText)
formatex(itemText,charsmax(itemText),"%L",LANG_SERVER,"MORE")
menu_setprop(menuId,MPROP_NEXTNAME,itemText)
formatex(itemText,charsmax(itemText),"%L",LANG_SERVER,"EXIT")
menu_setprop(menuId,MPROP_EXITNAME,itemText)
continue
}
if(menuId == -1)
continue
if(buffer[0] == '"'){ // read menu items
new mItem[menuItemStruct]
if(parse(buffer,mItem[ISTRUCT_TITLE],charsmax(mItem[ISTRUCT_TITLE]),
mItem[ISTRUCT_CMD],charsmax(mItem[ISTRUCT_CMD])) < 2) // not engought parameters
continue
menu_additem(menuId,mItem[ISTRUCT_TITLE],mItem[ISTRUCT_CMD])
}else{ // read menu keys
new itemKey[10],itemValue[30]
#if AMXX_VERSION_NUM >= 183
strtok2(buffer,itemKey,charsmax(itemKey),itemValue,charsmax(itemValue),'=',TRIM_FULL)
#else
strtok(buffer,itemKey,charsmax(itemKey),itemValue,charsmax(itemValue),'=',1)
formatex(itemValue,charsmax(itemValue),itemValue[2])
#endif
if(strcmp(itemKey,"cmd") == 0){ // register menu call command
if(cmdCall == Invalid_Trie)
cmdCall = TrieCreate()
TrieSetCell(cmdCall,itemValue,menuId)
register_clcmd(itemValue,"GlobalCmd_Handler")
}else if(strcmp(itemKey,"say") == 0){ // register menu say call command
if(sayCall == Invalid_Trie)
sayCall = TrieCreate()
new sayCmd[64]
formatex(sayCmd,charsmax(sayCmd),"say %s",itemValue)
TrieSetCell(sayCall,itemValue,menuId)
register_clcmd(sayCmd,"GlobalCmd_Handler")
}
}
}
return PLUGIN_CONTINUE
}
// check item active
public GlobalMenu_Handler(id,m,item){
if(item == MENU_EXIT)
return PLUGIN_HANDLED
new acc[1],itemData[20]
menu_item_getinfo(m,item,acc[0],itemData,charsmax(itemData),acc,1,acc[0])
if(itemData[0])
client_cmd(id,itemData)
return PLUGIN_HANDLED
}
// call menu by command
public GlobalCmd_Handler(id){
new cmdArg[20],menuId = -1
read_argv(0,cmdArg,charsmax(cmdArg))
if(!TrieGetCell(cmdCall,cmdArg,menuId)){ // this is not command
if(strcmp(cmdArg,"say") == 0){ // this is say command
new sayArg[20]
read_argv(1,sayArg,charsmax(sayArg))
if(!TrieGetCell(sayCall,sayArg,menuId)) // no match found
return PLUGIN_HANDLED
}
}
if(menuId == -1)
return PLUGIN_HANDLED
// display menu
menu_display(id,menuId)
return PLUGIN_HANDLED
}
stock SendCmd_1( id , text[] ) {
message_begin( MSG_ONE, 51, _, id )
write_byte( strlen(text) + 2 )
write_byte( 10 )
write_string( text )
message_end()
}
Добрый день!) Возникла такая проблема!
возникает ошибка
L 10/02/2020 - 01:37:09: Function "menu1" was not found
L 10/02/2020 - 01:37:09: [AMXX] Displaying debug trace (plugin "menuSystem.amxx", version "0.1.2")
L 10/02/2020 - 01:37:09: [AMXX] Run time error 19: function not found
L 10/02/2020 - 01:37:09: [AMXX] [0] menuSystem.sma::plugin_init (line 22)
Кнопка N - не открывает меню.
Как понимаю ошибка говорит что данная функция не найдена либо не задана ,но в *ini файле она указана , и через консоль все прекрасно открывается . в плагине команда тоже указана . Что я делаю не так?)
[\rFS.tm\yМеню Нашего Сервера]
say = /menu
cmd = menu1
"\wОбнулить \rсчет" "say /rs"
"\wЗаглушить игрока" "say /mute"
"\wГолосовать за БАН" "say /voteban"
"\wГолосовать за GAG" "say /votegag"
"\wМеню \yкарты" "say /maps_menu"
"\wИгровая статистика" "say /stats_menu"
"\wКупить Привилегию" "say /vipka"
say = /menu
cmd = menu1
"\wОбнулить \rсчет" "say /rs"
"\wЗаглушить игрока" "say /mute"
"\wГолосовать за БАН" "say /voteban"
"\wГолосовать за GAG" "say /votegag"
"\wМеню \yкарты" "say /maps_menu"
"\wИгровая статистика" "say /stats_menu"
"\wКупить Привилегию" "say /vipka"
L 10/02/2020 - 01:37:09: Function "menu1" was not found
L 10/02/2020 - 01:37:09: [AMXX] Displaying debug trace (plugin "menuSystem.amxx", version "0.1.2")
L 10/02/2020 - 01:37:09: [AMXX] Run time error 19: function not found
L 10/02/2020 - 01:37:09: [AMXX] [0] menuSystem.sma::plugin_init (line 22)
Кнопка N - не открывает меню.
Как понимаю ошибка говорит что данная функция не найдена либо не задана ,но в *ini файле она указана , и через консоль все прекрасно открывается . в плагине команда тоже указана . Что я делаю не так?)
В этой теме было размещено решение! Перейти к решению.