Array index out of bounds
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 a = 0; a < g_Accesories; a ++) { if(g_PlayerSkill[id][a] >= g_MaxAccesoriesLevel[a]) Level[a] = g_PlayerSkill[id][a]; else Level[a] = g_PlayerSkill[id][a] + 1; } for(new b = 0; b < g_Accesories; b ++) { if(g_PlayerSkill[id][b] < g_MaxAccesoriesLevel[b]) Cost[b] = ( g_PlayerSkill[id][b] + 1 ) * g_CostOfAccesories[b] else Cost[b] = 0 } for(new c = 0; c < g_Accesories; c ++) { color1[c] = g_PlayerMoney[id][Normal] < g_CostOfAccesories[c] ? "\d" : "\w" } for(new d = 0; d < g_Accesories; d ++) { color2[d] = g_PlayerMoney[id][Normal] < g_CostOfAccesories[d] ? "\d" : "\w" } format(menu, charsmax(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(id, g_MainMenuSecondKeys, menu, -1, "MMMainMenuSecond"); } /// LINE 467
|