11.08.2013, 11:23
Hello, this is my code:
And that gives me something back from crashdetect:
Why does it do that?
pawn Код:
public OnFilterScriptInit ()
{
printf (" \nSchool Project Loaded.\n");
SetTimer ("CheckValidTextDraws", 1000, 1);
RadarHud = TextDrawCreate (495.0, 200.0, "~b~Model: ~n~~r~Speed: kmph");
TextDrawFont (RadarHud, 2);
TextDrawLetterSize (RadarHud, 0.3, 1.0);
for (new i = 1; i <= MAX_VEHICLES; i++)
{
VehRadarID [i] = -1;
SpeedAndModel [i] = TextDrawCreate (545.0, 200.0, "~b~ ~n~~r~");
TextDrawFont (SpeedAndModel [i], 2);
TextDrawLetterSize (SpeedAndModel [i], 0.3, 1.0);
CheckingSpeed [i] = 0;
}
return 1;
}
Код:
[13:45:15] [debug] Run time error 4: "Array index out of bounds" [13:45:15] [debug] Accessing element at index 2000 past array upper bound 1999 [13:45:15] [debug] AMX backtrace: [13:45:15] [debug] #0 000001f0 in public OnFilterScriptInit () from SchoolProject.amx