Started with param validation and BIS_fnc_error

This commit is contained in:
Wyqer 2019-12-03 22:27:05 +01:00
parent 7849e93627
commit 00656a53d4
No known key found for this signature in database
GPG Key ID: D7E2F8BD7F1E48FA
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,8 @@ params [
["_vehicle", objNull, [objNull]]
];
if (isNull _vehicle) exitWith {["Null object given"] call BIS_fnc_error; false};
// KP_liberation_allowEnemiesInImmobile (0-50-100)
_vehicle allowCrewInImmobile (random 100 < KP_liberation_allowEnemiesInImmobile);

View File

@ -2,7 +2,7 @@
File: fn_checkClass.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-11-25
Last Update: 2019-11-25
Last Update: 2019-12-03
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
@ -19,6 +19,8 @@ params [
["_classname", "", [""]]
];
if (_classname isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; false};
if (isClass (configFile >> "CfgVehicles" >> _classname)) then {
true
} else {