Raised This Month: $ Target: $400
 0% 

Menu bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-22-2009 , 15:14   Re: Menu bug
Reply With Quote #1

The reason is that you're using menu_addblank() with slot set to 0. This causes it to not increase the number of total slots, so 7 is beyond the range of the menu. If you have 5 items and 2 blanks (with slot=0), then your total range is 5.

Also, your range starts at 0. So if you have 5 items, keys 0-4 are valid but 5 is not. It is similar to arrays.
__________________

Last edited by Hawk552; 10-22-2009 at 15:18.
Hawk552 is offline
Send a message via AIM to Hawk552
Reply



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 17:34.


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