AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   New Menu Help (Global Variable) (https://forums.alliedmods.net/showthread.php?t=82953)

Drak 01-01-2009 19:08

New Menu Help (Global Variable)
 
Code:
new g_NewMenu[33] ... NewPlayerMenu(id,End) {     g_NewMenu[id] = menu_create("MY Menu","NewPlayerOptions");         menu_setprop(g_NewMenu[id],MPROP_EXIT,MEXIT_NEVER);     menu_addtext(g_NewMenu[id],"Hello World");     menu_display(id,g_NewMenu[id]);     set_task(60.0,"RestartMenu",id); } public RestartMenu(id) {     menu_setprop(g_NewMenu[id],MPROP_EXIT,MEXIT_ALL);     menu_display(id,g_NewMenu[id]); }
This all works, but it doesn't re-display the menu when the task is called. Why? If I take out "menu_display" and refresh the menu via "NewPlayerOptions" menu handle, it updates with the exit button. Can I not show the menu anywhere else?

EDIT:
Now I get an error when the menu is displayed:
Code:

L 01/01/2009 - 19:47:49: Info (map "mecklenburg_drak") (file "addons/amxmodx/logs/error_20090101.log")
L 01/01/2009 - 19:47:49: Plugin called menu_display when item=MENU_EXIT
L 01/01/2009 - 19:47:49: [AMXX] Displaying debug trace (plugin "RevCore.amxx")
L 01/01/2009 - 19:47:49: [AMXX] Run time error 10: native error (native "menu_display")
L 01/01/2009 - 19:47:49: [AMXX]    [0] RevCore.sma::RestartMenu (line 2364)


Exolent[jNr] 01-01-2009 21:16

Re: New Menu Help (Global Variable)
 
I think you have to add a menu item.

Drak 01-01-2009 22:23

Re: New Menu Help (Global Variable)
 
Nothing.


All times are GMT -4. The time now is 09:08.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.