Raised This Month: $ Target: $400
 0% 

index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 08-14-2012 , 12:52   index out of bounds
Reply With Quote #1

I have this const:
PHP Code:
new const PRIMARY[ ][ ] = { 
    
"weapon_m4a1",        // Gun ID - 1
    
"weapon_ak47",        // Gun ID - 2
    
"weapon_m3",         // Gun ID - 3
    
"weapon_xm1014",    // Gun ID - 4
    
"weapon_aug",        // Gun ID - 5
    
"weapon_mac10",        // Gun ID - 6
    
"weapon_ump45",        // Gun ID - 7
    
"weapon_mp5navy",    // Gun ID - 8
    
"weapon_p90",        // Gun ID - 9
    
"weapon_galil",        // Gun ID - 10
    
"weapon_famas"        // Gun ID - 11
}; 
and I need that from another const:
PHP Code:
 new const allowed_primary[ ] = { 124567891011 
Would print into menu only those ids which are in const:
PHP Code:
        for( i_prim 0i_prim 8i_prim++ ) {
            
p_id = ( ( _curr_pageid ] * ) + i_prim );
            if( 
p_id _totalguns )
                
len += formatexdata_holderlen ], charsmaxdata_holder ) - len"^n \r%i\d. %s"i_prim 1P_NAMESallowed_primaryp_id ] ] );                
        } 
But I get index out of bounds here:
PHP Code:
P_NAMESallowed_primaryp_id ] ] 
Is there any other way to do this ?
DoviuX is offline
Send a message via Skype™ to DoviuX
 



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 05:45.


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