Raised This Month: $ Target: $400
 0% 

[HELP] Run time error 4: index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Michell
Member
Join Date: Oct 2015
Old 11-15-2015 , 14:24   [HELP] Run time error 4: index out of bounds
Reply With Quote #1

PHP Code:
public MenuHandler(id,iMenu,iKey){
    new 
sName[32];
        
get_user_name(id,sName,charsmax(sName));
    
    
g_iVotes[iKey]++;
    

    
    return 
PLUGIN_HANDLED;

Michell is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-15-2015 , 14:26   Re: [HELP] Run time error 4: index out of bounds
Reply With Quote #2

g_iVotes[] is not sized large enough to handle the max iKey value specified to it.
__________________
Bugsy is offline
Michell
Member
Join Date: Oct 2015
Old 11-15-2015 , 14:33   Re: [HELP] Run time error 4: index out of bounds
Reply With Quote #3

? wan

Last edited by Michell; 11-16-2015 at 14:02.
Michell is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-15-2015 , 14:44   Re: [HELP] Run time error 4: index out of bounds
Reply With Quote #4

Show how you created g_iVotes
__________________
HamletEagle is offline
Michell
Member
Join Date: Oct 2015
Old 11-15-2015 , 14:49   Re: [HELP] Run time error 4: index out of bounds
Reply With Quote #5

? wn

Last edited by Michell; 11-16-2015 at 14:02.
Michell is offline
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 17:56.


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