14.06.2013, 20:17
I have a picture of OnPlayerEnterVehicle callback.
Why crashdetect says: Array Index out of bounds?
Why crashdetect says: Array Index out of bounds?
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (gCar[vehicleid][vSigna])
{
signalisatsioon(vehicleid);
SCM(playerid, COLOR_LIGHTRED, "Sхiduki signalisatsioon hakkas tццle!");
}
if (groupVariables[vehicleVariables[vehicleid][vVehicleGroup]][gGroupType] == 8 && ispassenger)
{
new taksojuht = GetVehicleDriver(vehicleid);
if (taksojuht != -1)
{
if (groupVariables[playerVariables[taksojuht][pGroup]][gGroupType] == 8)
{
if (taksohind[taksojuht] != -1)
{
if (playerVariables[playerid][pMoney] < taksohind[taksojuht])
{
RemovePlayerFromVehicle(playerid);
SCM(playerid, COLOR_RED, "Sul pole piisavalt raha!");
}
taksomeeter[playerid] = 0;
taksomeeter[playerid] += taksohind[taksojuht];
new string[64];
format(string, sizeof(string), "Taksomeeter: %i$", taksomeeter[playerid]);
foreach (Player, i)
{
if (IsPlayerInVehicle(i, vehicleid)) GameTextForPlayer(i, string, 10000, 1);
}
}
}
}
}
if (t88timer[playerid] != -1)
{
if (vehicleid == t88autoid[playerid])
{
KillTimer(t88timer[playerid]);
t88timer[playerid] = -1;
}
}
return 1;
}