Raised This Month: $ Target: $400
 0% 

New Menu Help (Global Variable)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 01-01-2009 , 19:08   New Menu Help (Global Variable)
Reply With Quote #1

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)
__________________
Oh yeah

Last edited by Drak; 01-01-2009 at 19:51.
Drak is offline
Send a message via MSN to Drak
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-01-2009 , 21:16   Re: New Menu Help (Global Variable)
Reply With Quote #2

I think you have to add a menu item.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 01-01-2009 , 22:23   Re: New Menu Help (Global Variable)
Reply With Quote #3

Nothing.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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