Raised This Month: $ Target: $400
 0% 

Array index out of bounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kyriuch
Member
Join Date: Jul 2010
Old 09-09-2012 , 06:01   Array index out of bounds
Reply With Quote #1

Hey. Got problem with compiling. Help!

Debuger:

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Input line too long (after substitutions) on line 452
Error: Array index out of bounds (variable "color1") on line 453
Warning: Loose indentation on line 464
Error: Undefined symbol "lentFootsteps" on line 464
Warning: Loose indentation on line 465
Error: Invalid expression, assumed zero on line 465
Warning: Expression has no effect on line 465
Warning: Loose indentation on line 467

4 Errors.
Could not locate output file C:\Program Files  (x86)\Steam\steamapps\jurigagarin25\dedicated  server\cstrike\addons\amxmodx\plugins\mm.amx (compile failed).
PHP Code:
ShowMainMenuSecond(id)
{
        new 
menu[512], Cost[g_Accesories], Level[g_Accesories],color1[3][g_Accesories],color2[3][g_Accesories];
        
        for(new 
0g_Accesories++)
        {
                if(
g_PlayerSkill[id][a] >= g_MaxAccesoriesLevel[a]) Level[a] = g_PlayerSkill[id][a];
                else 
Level[a] = g_PlayerSkill[id][a] + 1;
        }
        
        for(new 
0g_Accesories++)
        {
                if(
g_PlayerSkill[id][b] < g_MaxAccesoriesLevel[b]) Cost[b] = ( g_PlayerSkill[id][b] + ) * g_CostOfAccesories[b]
                else 
Cost[b] = 0
        
}
        
        for(new 
0g_Accesories++)
        {
                
color1[c] = g_PlayerMoney[id][Normal] < g_CostOfAccesories[c] ? "\d" "\w"
        
}
        
        for(new 
0g_Accesories++)
        {
                
color2[d] = g_PlayerMoney[id][Normal] < g_CostOfAccesories[d] ? "\d" "\w"
        
}
        
        
format(menucharsmax(menu),\
                
g_MainMenuSecond,\
                
PLUGIN_PREFIX,\
                
color1[Stealth],\
                
color2[Stealth],\
                
Level[Stealth],\
                
Level[Stealth] * g_AmountPerLevel[Stealth],\
                
Cost[Stealth],\
                
color1[FasterRunning],\
                
color2[FasterRunning],\
                
Level[FasterRunning],\
                
Level[FasterRunning] * g_AmountPerLevel[FasterRunning],\
                
Cost[FasterRunning],\
                
color1[DamageIncreaser],\
                
color2[DamageIncreaser],\
                
Level[DamageIncreaser],\
                
Level[DamageIncreaser] * g_AmountPerLevel[DamageIncreaser],\
                
Cost[DamageIncreaser],\
                
color1[SilentFootsteps],\
                
color2[SilentFootsteps],\
                
Cost[SilentFootsteps],\
                
color1[AntiFlash],\
                
color2[AntiFlash],\
                
Cost[AntiFlash],\
                
color1[AntiSmoke],\
                
color2[AntiSmoke],\
                
Cost[AntiSmoke],\
                
color1[NoPainShock],\
                
color2[NoPainShock],\
                
Cost[NoPainShock]
                );
                
        
show_menu(idg_MainMenuSecondKeysmenu, -1"MMMainMenuSecond");
}  
/// LINE 467 

Last edited by kyriuch; 09-09-2012 at 06:01.
kyriuch is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-09-2012 , 06:22   Re: Array index out of bounds
Reply With Quote #2

Code:
 032       array index  out  of  bounds 
           The array index is larger than the highest valid entry of the array.

Also, you don't need escape char when there is a comma.

Last, we can't guess what are lines numbers.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-09-2012 at 06:23.
ConnorMcLeod is offline
kyriuch
Member
Join Date: Jul 2010
Old 09-09-2012 , 06:27   Re: Array index out of bounds
Reply With Quote #3

I wrote that the last line is //467

Last edited by kyriuch; 09-09-2012 at 06:27.
kyriuch is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-09-2012 , 06:28   Re: Array index out of bounds
Reply With Quote #4

So we have to count back untill 453 ? you are kidding.
Also you use format native in a wrong way.
Is the plugin yours or do you make some edition ?
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-09-2012 at 06:30.
ConnorMcLeod 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 08:15.


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