10.07.2014, 17:19
Why does it say in the server console:
[14:57:37] [debug] Run time error 4: "Array index out of bounds"
[14:57:37] [debug] Accessing element at index 65535 past array upper bound 1999
[14:57:37] [debug] AMX backtrace:
[14:57:37] [debug] #0 00017c50 in public zcmd_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #1 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #2 0000e454 in public ScriptInit_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #3 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #4 000076b0 in public SSCANF_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #5 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #6 00001858 in public Itter_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #7 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #8 0000104c in public Streamer_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #9 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #10 000006f8 in public OnGameModeInit () from LSGW2.amx
In this code:
[14:57:37] [debug] Run time error 4: "Array index out of bounds"
[14:57:37] [debug] Accessing element at index 65535 past array upper bound 1999
[14:57:37] [debug] AMX backtrace:
[14:57:37] [debug] #0 00017c50 in public zcmd_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #1 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #2 0000e454 in public ScriptInit_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #3 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #4 000076b0 in public SSCANF_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #5 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #6 00001858 in public Itter_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #7 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #8 0000104c in public Streamer_OnGameModeInit () from LSGW2.amx
[14:57:37] [debug] #9 native CallLocalFunction () [00472ad0] from samp-server.exe
[14:57:37] [debug] #10 000006f8 in public OnGameModeInit () from LSGW2.amx
In this code:
pawn Код:
new vehicle;
public OnGameModeInit()
{
for(new i = 0; i < MAX_GANGS; i++)
{
if(strval(dini_Get(gFileId(i), "GangCar1Model")) > 400 || strval(dini_Get(gFileId(i), "GangCar1Model")) < 611)
{
vehicle = CreateVehicle(strval(dini_Get(gFileId(i),"GangCar1Model")), strval(dini_Get(gFileId(i),"GangCar1PosX")),strval(dini_Get(gFileId(i),"GangCar1PosY")), strval(dini_Get(gFileId(i),"GangCar1PosZ")), strval(dini_Get(gFileId(i),"GangCar1PosAngle")), strval(dini_Get(gFileId(i),"GangCar1Color1")), strval(dini_Get(gFileId(i),"GangCar1Color2")), -1);
GangVehicle[vehicle] = 1;
}
if(strval(dini_Get(gFileId(i), "GangCar2Model")) > 400 || strval(dini_Get(gFileId(i), "GangCar2Model")) < 611)
{
vehicle = CreateVehicle(strval(dini_Get(gFileId(i),"GangCar2Model")), strval(dini_Get(gFileId(i),"GangCar2PosX")),strval(dini_Get(gFileId(i),"GangCar2PosY")), strval(dini_Get(gFileId(i),"GangCar2PosZ")), strval(dini_Get(gFileId(i),"GangCar2PosAngle")), strval(dini_Get(gFileId(i),"GangCar2Color1")), strval(dini_Get(gFileId(i),"GangCar2Color2")), -1);
GangVehicle[vehicle] = 1;
}
if(strval(dini_Get(gFileId(i), "GangCar3Model")) > 400 || strval(dini_Get(gFileId(i), "GangCar3Model")) < 611)
{
vehicle = CreateVehicle(strval(dini_Get(gFileId(i),"GangCar3Model")), strval(dini_Get(gFileId(i),"GangCar3PosX")),strval(dini_Get(gFileId(i),"GangCar3PosY")), strval(dini_Get(gFileId(i),"GangCar3PosZ")), strval(dini_Get(gFileId(i),"GangCar3PosAngle")), strval(dini_Get(gFileId(i),"GangCar3Color1")), strval(dini_Get(gFileId(i),"GangCar3Color2")), -1);
GangVehicle[vehicle] = 1;
}
if(strval(dini_Get(gFileId(i), "GangCar4Model")) > 400 || strval(dini_Get(gFileId(i), "GangCar4Model")) < 611)
{
vehicle = CreateVehicle(strval(dini_Get(gFileId(i),"GangCar4Model")), strval(dini_Get(gFileId(i),"GangCar4PosX")),strval(dini_Get(gFileId(i),"GangCar4PosY")), strval(dini_Get(gFileId(i),"GangCar3PosZ")), strval(dini_Get(gFileId(i),"GangCar4PosAngle")), strval(dini_Get(gFileId(i),"GangCar4Color1")), strval(dini_Get(gFileId(i),"GangCar4Color2")), -1);
GangVehicle[vehicle] = 1;
}
if(strval(dini_Get(gFileId(i), "GangCar5Model")) > 400 || strval(dini_Get(gFileId(i), "GangCar5Model")) < 611)
{
vehicle = CreateVehicle(strval(dini_Get(gFileId(i),"GangCar5Model")), strval(dini_Get(gFileId(i),"GangCar5PosX")),strval(dini_Get(gFileId(i),"GangCar5PosY")), strval(dini_Get(gFileId(i),"GangCar5PosZ")), strval(dini_Get(gFileId(i),"GangCar5PosAngle")), strval(dini_Get(gFileId(i),"GangCar5Color1")), strval(dini_Get(gFileId(i),"GangCar5Color2")), -1);
GangVehicle[vehicle] = 1;
}
}