Run Time Error 4
#2

What if the player is not in any vehicle so GetPlayerVehicleID returns 0? It will subtract 400 so the index will be -400 (invalid as the valid indexes of the array are 0 to 211).

PHP код:
GetVehicleName(vehicleid)
{
    new 
string[32] = "N/A"modelid GetVehicleModel(vehicleid);
    if (
modelidstrcat((string[0] = EOSstring), VehicleNames[modelid 400], sizeof (string));
    return 
string;

Reply


Messages In This Thread
Run Time Error 4 - by bgedition - 23.05.2015, 11:49
Re: Run Time Error 4 - by Konstantinos - 23.05.2015, 12:01
Re: Run Time Error 4 - by bgedition - 23.05.2015, 14:06
Re: Run Time Error 4 - by Konstantinos - 23.05.2015, 14:12
Re: Run Time Error 4 - by bgedition - 23.05.2015, 14:17
Re: Run Time Error 4 - by Konstantinos - 23.05.2015, 14:37
Re: Run Time Error 4 - by bgedition - 23.05.2015, 14:43
Re: Run Time Error 4 - by Konstantinos - 23.05.2015, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)