VoteMenu - index out of bounds
I'm have a vote days.
And I get in votemenu handler always full error of this: Code:
L 01/09/2015 - 11:17:12: [AMXX] Displaying debug trace (plugin "test_votedays.amxx")code: Code:
new g_iSelectedDays[ 4 ], g_iVotes[ 4 ], g_iPlayersVotes[ 33 ];PHP Code:
Code:
ColorChat( client, RED, "%s You have Voted to^x04 %s^x01.", g_szPrefix, g_szDaysData[ g_iSelectedDays[ item ] ][ m_DayName ] ); |
Re: VoteMenu - index out of bounds
Either post the entire code or at least the entire VoteMenu part...
|
Re: VoteMenu - index out of bounds
I added the end of the Public
votedays because I do not think it is related I wrote the first response to the problem. |
Re: VoteMenu - index out of bounds
Quote:
1. The public that resets the vote 2. The public that creates the vote menu 3. The new round public that probably have some stuff about the vote You have nothing to be afraid of I already have Vote Menu of my own and its very easy to script... |
Re: VoteMenu - index out of bounds
fixed
|
Re: VoteMenu - index out of bounds
You are trying to get data from an array in a place doesn't exist.
lets say i have an array with four spots ( Array[ 4 ], i have Array[ 0 ], Array[ 1 ], Array[ 2 ] and Array[ 3 ] ) this error would happen if i will try to get data from a place above 3 ( Array[ 6 ] for exmaple ) if you want us to help you, give us the specific line the debug sends you |
Re: VoteMenu - index out of bounds
You should check if item is greater than -1 (not just if it equals MENU_EXIT).
You should debug the code to see if you are actually getting a negative number (I recently had this issue which is why my first suggestion is as stated above). |
Re: VoteMenu - index out of bounds
@fysiks
Quote:
I did a full test and checked I have such a menu of this and only this votemenu (days) Gives me this error I do not know if it's because of the other menus I have a different mode |
Re: VoteMenu - index out of bounds
Quote:
|
Re: VoteMenu - index out of bounds
Quote:
|
| All times are GMT -4. The time now is 15:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.