09.06.2015, 19:39
Posting what actually crashdetect printed would be useful otherwise it's just guessing.
For index -400, check VehicleName (model ID must be between 400-611 otherwise run time error 4).
For other index, see this:
In case DealerShipData array is full and you are in range with the last point, dealershipid will be the last index + 1 which is actually out of bounds.
EDIT:
Yes, it was the name. DealerShipVehicle[i][Model] is 0 so either the vehicle does not exist or you forgot to assign the model ID.
Modify VehicleName and if the model ID is not between 400-611, do not retrieve the name from the array. Let it be NULL. You can also check in the loop, if the vehicle does not exist, skip to the next variable iterator (continue;).
For index -400, check VehicleName (model ID must be between 400-611 otherwise run time error 4).
For other index, see this:
pawn Код:
DealerShipData[dealershipid][dsName]
EDIT:
Yes, it was the name. DealerShipVehicle[i][Model] is 0 so either the vehicle does not exist or you forgot to assign the model ID.
Modify VehicleName and if the model ID is not between 400-611, do not retrieve the name from the array. Let it be NULL. You can also check in the loop, if the vehicle does not exist, skip to the next variable iterator (continue;).