 |
|
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
|

08-15-2008
, 06:47
Re: Optimize/fix my code
|
#5
|
Quote:
Originally Posted by [X]-RayCat
Code:
new Names[6][] ={
"",
"Silent Footsteps",
"150 health",
"Sunglasses (No flash)",
"Steahlt-Suit",
"150 Armor" }
for ( i = 1; i < 9; i++)
{
format(nr, 2,"%i", i)
format(Form, 49, "%s: ($%i)", Names[i], get_pcvar_num(pcvars[i])) menu_additem(menu, Form, nr, 0);
}
The menu doesnt open it say something like "Index out of bounds". 
|
The names array is to small use sizeof or make the number nine smaller
__________________
Last edited by fxfighter; 08-15-2008 at 06:50.
|
|
|
|