add isNull check to load vehicle

This commit is contained in:
vbawol 2016-06-15 10:47:25 -05:00
parent 7c8e645169
commit 072ef02e77

View File

@ -65,6 +65,8 @@ for "_i" from 1 to _maxVehicleLimit do {
};
_vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
if !(isNull _vehicle) then {
_allVehicles pushBack _vehicle;
_vehicle call EPOCH_server_setVToken;
_vehicle call EPOCH_server_vehicleInit;
@ -241,6 +243,10 @@ for "_i" from 1 to _maxVehicleLimit do {
_vehicle enableSimulationGlobal false;
};
} else {
diag_log format["DEBUG: vehicle object Null: class: %1, loc: %2, slot: %3",_class, _location,str(_i)];
};
} else {
diag_log format["DEBUG: invalid vehicle position array %1",_location];
};