[HELP] I have a error in my GM please help
#1

C:\Users\netfabbe\Desktop\GTA Script\gamemodes\tprp.pwn(76762 -- 76769) : error 032: array index out of bounds (variable "vehTrunk")
C:\Users\netfabbe\Desktop\GTA Script\gamemodes\tprp.pwn(76806) : error 032: array index out of bounds (variable "vehTrunk")
C:\Users\netfabbe\Desktop\GTA Script\gamemodes\tprp.pwn(76807) : error 032: array index out of bounds (variable "vehTrunkAmmo")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

public SaveTrunk()
{
new idx;
new File: file2;
idx = 184;
while (idx < sizeof(CarInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%i,%i,%i,%i,%i,%i,%i,%i,%i,%f\n",
vehTrunk[idx][1],
vehTrunkAmmo[idx][1],
vehTrunk[idx][2],
vehTrunkAmmo[idx][2],
vehTrunk[idx][3],
vehTrunkAmmo[idx][3],
vehTrunk[idx][4],

vehTrunkAmmo[idx][4],
vehTrunkCounter[idx],
vehTrunkArmour[idx]);
if(idx == 1)
{
file2 = fopen("TPRP/Trunks/trunk.cfg", io_write);
}
else
{
file2 = fopen("TPRP/Trunks/trunk.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}

What to do?

Please help me
Reply
#2

Search for a statement somewhere in your script which starts like

pawn Код:
new vehTrunkAmmo
and show us.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)