Run time error 10: native error (native "menu_display") #18
Comments
Update: I picked the PUG_DisplayMenuClient function and added some server_prints to see what's happening And after that i noticed that player_menu_info(id,iMenu[0],iMenu[1]) is ALWAYS returning 1, even if i don't have any menu opened. And i rememberd that some time ago was a bug with VGUI menu and i switched to old style menus. `public PUG_DisplayMenuClient(id)
}` Printing values:
|
I already fixed this for next version, i really need a bit more time to upload new pug bro. I think someone already reported in amxx repository the bug with player_menu_info or m_iMenu player variable on hlds, or also can be because i'm using rehlds to test pug. You can safely use:
to avoid that bug with vgui menus. I only do that function to prevent game menus being override with new icoming menu from pug Thanks for reporting it bro |
I fixed that by checking iMenu[0] < 1 before displaying the menu. Did you planned big changes between versions ? |
I changed whole mod to use only reapi, i do not think that amxx will update more than reapi that is good to use. |
I have started to read more about rehlds and reapi and i'm excited about the project, but unfortunate valve doesn't accept and support it. So, personally i will stick with the official hlds just because valve doesn't support it. i know that it has some compatibility issues with other modules also. I know that rehlds solve many issues like bugs, exploits, performance but at the moment i'm trying to see if everything works well for me with official engine. If my servers will be heavy exploited and i cannot patch it somehow (eg. writing a module or a plugin that fix the issue) i will take in consideration switching to rehlds. About the plugin, i think it's a good ideea to update it for rehlds and reapi because more and more people are adopting it and also you save performance using engine apis instead of plugin code. But keep in mind that not everyone adopted rehlds so, my sugestion is to make it as a separate project and keep the actual repo for official engine and another one for rehlds + reapi. I checked pugcore and i think you can improve autoban system. I will make some plugins using natives and forwards to integrate your plugin with a gaming platform |
About disconnects, server detect some situations like this, i do not think that is a big problem but can create other ban system out of the box, and out of core plugin, i think somthing like pug menus, that are used out of core plugin. For me, it will be better to manage bans. I also started to coding a new ban system using sqlite or any sqlite compatible. About vote, in new version is a new plugin with one menu only, that you can choose the vote you like to run in server. |
Yes, i think is a good ideea to create plugins ot of the box and out of the core plugin. In the core plugin you should keep just the core system (like the game system) and everything else, like banning system, map voting system should be made as separate packages because it will save some performance when they are disabled (fewer checks) and the most important thing, it will be easier to edit and manage them. Of course, with forwards and natives will be a slower performance (not very much) when the packages are loaded, but it's 2020 :D and making it easier to mantain and use it's a big plus! Also, when u release new updates, try to make the everything backwards compatible by keeping the natives, forwards and states, so the packages made for your plugin will still work. And please, don't forget to make a version for the hlds official engine. About the knife round. You don't have to overcomplicate, let them run on the entire map if they want. You cand just add a new state for knife rounds, when round start, check the state (or you can make a package and use only a boolean variable), if it's knife round strip the guns and disable buy zones and let them play. Or you cand force only knife on client as a weapon and you don't need to strip and disable buy zone. When the round is over, the winning team is the team with more players alive, if they are same, the team with more hp. You can display a menu for players where they can vote what side they want to play, and.. that's it. Live and go! If you really want to make it with fight range and not care about the guns and smth else, you can load a knife map :D (sounds crazy, but it's a new ideea) they fight there and then load the game map and start the pug. |
Forward do not affect performance, since is not executed while game is running, check for example warmup plugin, that store the result of PugEvent instead of check using PugGetState. |
Ohh, yess you're alright. My bad bro! Edit: Another thing you cand add in your pug system is HLTV support! |
I already do this in past, is not hard need only to fix hudmessages that is sent to hltv, these messages are crashing hltv proxy. |
Did you have any contact form? That you can send it bro? |
ofc bro, add me on steam: https://steamcommunity.com/id/pleso |
Would you care to explain to a noob in programming? Im trying to run it too on HLDS. |
I also have this problem, any tip on how to fix it ? |
Fixed menu display. |
Hi, i just installed latest amxmodx version ("amxmodx_version" = "1.10.0.5406") and pugmode with no other plugin!
However, sometimes when i type !startpug or .vote the menu isn't displayed bcs of some native error
Log:
L 08/31/2020 - 02:22:13: Invalid menu id -1(2)
L 08/31/2020 - 02:22:13: [AMXX] Displaying debug trace (plugin "PugMenus.amxx", version "3.1.1")
L 08/31/2020 - 02:22:13: [AMXX] Run time error 10: native error (native "menu_display")
L 08/31/2020 - 02:22:13: [AMXX] [0] PugMenus.inc::PUG_DisplayMenuClient (line 64)
Modules:
FakeMeta 1.10.0.540 AMX Mod X Dev Team running
CStrike 1.10.0.540 AMX Mod X Dev Team running
CSX 1.10.0.540 AMX Mod X Dev Team running
Ham Sandwich 1.10.0.540 AMX Mod X Dev Team running
The text was updated successfully, but these errors were encountered: