Raised This Month: $51 Target: $400
 12% 

[BUG] New Menu and menu_destroy


  
 
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-09-2006 , 03:36   [BUG] New Menu and menu_destroy
#1

What is happening is i'm creating a menu with the new menu system. Then I open the menu. I destory the menu and recreate everything. Then if you hit a button on the current menu that is open it will crash.

Using the newest files from the cvs.

Quote:
Step's I did:
alfred_test
reload_menu
I just hit option 1 or 2
It just crashed after that. What i'm trying to doing is allowing the admin's to reload the menu if they need to mid-game if they want to. I have attached a sample plugin. If this was not how it was meant to use. Then i'll just remove this option out of the plugin.
Attached Files
File Type: sma Get Plugin or Get Source (gaben.sma - 704 views - 3.4 KB)
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
BAILOPAN
Join Date: Jan 2004
Old 02-09-2006 , 03:47  
#2

I think you uploaded the wrong file because I don't see those commands in there.

Anyway, you shouldn't detect items by their number. The item numbers aren't guaranteed to map to anything recognizable, that's why you get menu_item_getinfo.
__________________
egg
BAILOPAN is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-09-2006 , 05:43  
#3

I uploaded the correct one now
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
BAILOPAN
Join Date: Jan 2004
Old 02-09-2006 , 06:53  
#4

fixed in CVS. this was three bugs:
1. there was code to prevent this, but it compared against oldmenu ids rather than newmenu ids
2. exit wasn't guaranteed. newmenus guarantee that if a user disconnects or the menu is destroyed while they're viewing it, you'll still get your callback called, just with MENU_EXIT. there are tricky recursion problems with this, but it should be guarded.
3. the menu_destroy function had a few handle leaks

thanks
__________________
egg
BAILOPAN is offline
 



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 01:14.


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