debug help..
#1

Am getting a array upper bound 199 AMX backtrace


here is the debugs its not just one i get alot of this below..
Код:
[19:56:29] [debug] #0 00033bcc in public UpdateDashCam () from IGRP.amx
[19:56:29] [debug] Run time error 4: "Array index out of bounds"
[19:56:29] [debug]  Accessing element at index 65535 past array upper bound 199
[19:56:29] [debug] AMX backtrace:
public updatedashcam
Код:
public UpdateDashCam(playerid)
{
	if(!IsPlayerInAnyVehicle(playerid)) return 0x0;
	if(IsACopCar(playerid))
	{
		new pcv = GetNearestVehicle(playerid, dcam_Distance);
		new pvid = GetPlayerVehicleID(playerid);
		new Float:vPos[3];
		GetVehiclePos(pvid, vPos[0], vPos[1], vPos[2]);
		new Float:distance = GetVehicleDistanceFromPoint(pcv, vPos[0], vPos[1], vPos[2]);
		new Float:speed = GetVehicleSpeed(pcv, 0);
		new string[40];
		if(floatround(distance) <= dcam_Distance - 5.0)
		{
            format(string, sizeof(string), "P %s~n~S %d kmph~n~D %d m", VehicleNumberPlate[pcv], floatround(speed), floatround(distance));
		}
		else format(string, sizeof(string), "P N/A~n~S N/A kmph~n~D N/A m");
        PlayerTextDrawSetString(playerid, pDashCam[playerid], string);
	}
    return 0x1;
}
Reply


Messages In This Thread
debug help.. - by OpticKiller - 07.07.2013, 18:55
Re: debug help.. - by Alternative112 - 07.07.2013, 20:16
Re: debug help.. - by Konstantinos - 07.07.2013, 20:22
Re: debug help.. - by OpticKiller - 07.07.2013, 21:22

Forum Jump:


Users browsing this thread: 1 Guest(s)