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

(Help)? Run time error 4: index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 06-29-2017 , 15:37   (Help)? Run time error 4: index out of bounds
Reply With Quote #1

L 06/29/2017 - 165:03: Start of error session.
L 06/29/2017 - 165:03: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20170629.log")
L 06/29/2017 - 165:03: [AMXX] Displaying debug trace (plugin "zoa_sistema_patente.amxx")
L 06/29/2017 - 165:03: [AMXX] Run time error 4: index out of bounds
L 06/29/2017 - 165:03: [AMXX] [0] zoa_sistema_patente.sma::check_patente (line 466)
L 06/29/2017 - 165:03: [AMXX] [1] zoa_sistema_patente.sma::client_putinserver (line 24

PHP Code:
public client_putinserver(id)
{
    
check_patente(id0)
}

public 
check_patente(idsound)
{
    if(!
is_user_connected(id)) return PLUGIN_HANDLED
    
    
new name[33]
    
get_user_name(idnamecharsmax(name))
    
    if(
iPATENTE[id] < 16)
    {
        while((
iXP[id] >= XP[iPATENTE[id] + 1]))
        {
            
iPATENTE[id]++
            
            if(
sound)
            {
                
ColorChat(0GREEN"[z]Oa|^x01 Parabens,^x03 %s^x01 sua patente agora e:^x04 %s"namePATENTE[iPATENTE[id]])
                
client_cmd(0"spk ambience/lv_fruit1.wav")
            }
        }
    }
    
    if(
iPATENTE[id] > 1)
    {
        while((
iXP[id] < XP[iPATENTE[id]]))
        {
            
iPATENTE[id]--
            
            if(
sound)
            {
                
ColorChat(0GREEN"[z]Oa|^x01 Parabens,^x03 %s^x01 sua patente agora voltou para:^x04 %s"namePATENTE[iPATENTE[id]])
                
client_cmd(0"spk ambience/wolfhowl02.wav")
            }
        }
    }
    
    return 
PLUGIN_HANDLED

felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-29-2017 , 17:09   Re: (Help)? Run time error 4: index out of bounds
Reply With Quote #2

We can't possibly know which line is 466 in the code you posted. Also that's not enough code to determine the problem.
klippy is offline
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 06-29-2017 , 18:08   Re: (Help)? Run time error 4: index out of bounds
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
We can't possibly know which line is 466 in the code you posted. Also that's not enough code to determine the problem.
line 466 while((iXP[id] >= XP[iPATENTE[id] + 1]))
line 248 check_patente(id, 0)
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-29-2017 , 18:28   Re: (Help)? Run time error 4: index out of bounds
Reply With Quote #4

Quote:
Also that's not enough code to determine the problem.
klippy is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-30-2017 , 03:32   Re: (Help)? Run time error 4: index out of bounds
Reply With Quote #5

Post the arrays size..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 06-30-2017 , 18:06   Re: (Help)? Run time error 4: index out of bounds
Reply With Quote #6

I managed to clean it, thanks for the attention.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
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 07:25.


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