mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
add isNull check to load vehicle
This commit is contained in:
parent
7c8e645169
commit
072ef02e77
@ -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];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user