Raised This Month: $ Target: $400
 0% 

Index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Andu.
Member
Join Date: Oct 2013
Location: Belgravistan
Old 11-16-2013 , 05:48   Index out of bounds
Reply With Quote #1

I have this problem

PHP Code:
L 11/16/2013 03:07:48: [AMXXDisplaying debug trace (plugin "bpammo.amxx")
L 11/16/2013 03:07:48: [AMXXRun time error 4index out of bounds 
L 11
/16/2013 03:07:48: [AMXX]    [0bpammo.sma::Message_AmmoX (line 64
with this plugin

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"

enum
{
    
AmmoX_AmmoID 1,
    
AmmoX_Ammount
}

enum
{
    
ammo_none,
    
ammo_338magnum 1// 30
    
ammo_762nato// 90
    
ammo_556natobox// 200
    
ammo_556nato// 90
    
ammo_buckshot// 32
    
ammo_45acp// 100
    
ammo_57mm// 100
    
ammo_50ae// 35
    
ammo_357sig// 52
    
ammo_9mm// 120
    
ammo_flashbang// 2
    
ammo_hegrenade// 1
    
ammo_smokegrenade// 1
    
ammo_c4 // 1
}

new const 
g_iMaxBpAmmo[] = {
    
0,
    
30,
    
90,
    
200,
    
90,
    
32,
    
100,
    
100,
    
35,
    
52,
    
120,
    
2,
    
1,
    
1,
    
1
}

#define XO_PLAYER 5
#define m_rgpPlayerItems_0 376

public plugin_init()
{
    
register_plugin("Infinite BpAmmo"VERSION"ConnorMcLeod")
    
register_message(get_user_msgid("AmmoX"), "Message_AmmoX")
}

public 
Message_AmmoX(iMsgIdiMsgDestid)
{
    new 
iAmmoID get_msg_arg_int(AmmoX_AmmoID)

    if(
is_user_alive(id) && iAmmoID )
    {
        new 
iMaxBpAmmo g_iMaxBpAmmo[iAmmoID]
        if( 
get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo )
        {
            
#if defined UNLIMITED_NADES
            
if( iAmmoID ammo_c4 )
            
#else
            
if( iAmmoID <= ammo_9mm )
            
#endif
            
{
                
set_msg_arg_int(AmmoX_AmmountARG_BYTEiMaxBpAmmo)
                
set_pdata_int(idm_rgpPlayerItems_0 iAmmoIDiMaxBpAmmoXO_PLAYER)
            }
        }
    }

Andu. is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-16-2013 , 06:17   Re: Index out of bounds
Reply With Quote #2

wrong place..
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX 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 12:28.


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