27.04.2012, 17:20
pawn Code:
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 4 past array upper bound 3
[debug] Backtrace:
[debug] #0 0002220c in ?? () from ExplosionDMV1.0.amx
[debug] #1 00017700 in public OnPlayerStateChange () from ExplosionDMV1.0.amx
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
new aid = GetPlayerVehicleID(playerid);
if(OnRekka(aid))
{
if(PlayerInfo[playerid][pTool] == 1)
{
SendClientMessage(playerid, C_ORANGE, "TEADE: Sa oled tццl, palun transpordi kaup!");
}
else
{
SendClientMessage(playerid, C_ORANGE, "TEADE: Et tццle asuda, kirjuta palun /tццle!");
}
}
else if(OnAuto(aid))
{
if(PlayerInfo[playerid][pTool] == 1)
{
SendClientMessage(playerid, C_ORANGE, "TEADE: Sa oled tццl, palun transpordi kaup!");
}
else
{
SendClientMessage(playerid, C_ORANGE, "TEADE: Et tццle asuda, kirjuta palun /tццle!");
}
}
}
return 1;
}