diff --git a/addons/mission/functions/fnc_battlefieldMemorial.sqf b/addons/mission/functions/fnc_battlefieldMemorial.sqf index 7f426962..341d507f 100644 --- a/addons/mission/functions/fnc_battlefieldMemorial.sqf +++ b/addons/mission/functions/fnc_battlefieldMemorial.sqf @@ -30,12 +30,14 @@ if (_position isEqualType "OBJECT") then { _position = getPosATL _position; }; -// Error checking -if !(_helmet isEqualType "") exitWith { - ERROR_MSG_1("Invalid input (%1) expected classname as string.",_helmet) -}; -if !(_weapon isEqualType "") exitWith { - ERROR_MSG_1("Invalid input (%1) expected classname as string.",_weapon) +// Error checking - Only in Editor +if (is3DENPreview) then { + if !(_helmet isEqualType "") exitWith { + ERROR_MSG_1("Invalid input (%1) expected classname as string.",_helmet) + }; + if !(_weapon isEqualType "") exitWith { + ERROR_MSG_1("Invalid input (%1) expected classname as string.",_weapon) + }; }; private _memorial = createVehicle ["Land_BattlefieldCross_01_NATO_F", _position, [], 0, "CAN_COLLIDE"]; diff --git a/addons/mission/functions/fnc_carAlarm.sqf b/addons/mission/functions/fnc_carAlarm.sqf index a343a057..bdf785c5 100644 --- a/addons/mission/functions/fnc_carAlarm.sqf +++ b/addons/mission/functions/fnc_carAlarm.sqf @@ -19,16 +19,18 @@ params ["_vehicle", ["_removeAfterFiring", true]]; // Only add to Cars that would have alarms, extra check for wheeled APCs that inherit from Car_F -if !(_vehicle isKindOf "Car_F") exitWith { - ERROR_MSG_1("Vehicle (%1) is not a car.",_vehicle); -}; -if (_vehicle isKindOf "Wheeled_APC_F") exitWith { - ERROR_MSG_1("Vehicle (%1) is not a car.",_vehicle); -}; +if (is3DENPreview) then { + if !(_vehicle isKindOf "Car_F") exitWith { + ERROR_MSG_1("Vehicle (%1) is not a car.",_vehicle); + }; + if (_vehicle isKindOf "Wheeled_APC_F") exitWith { + ERROR_MSG_1("Vehicle (%1) is not a car.",_vehicle); + }; -// Needs empty vehicle -if (crew _vehicle isNotEqualTo []) exitWith { - ERROR_MSG_1("Vehicle (%1) must be empty.",_vehicle); + // Needs empty vehicle + if (crew _vehicle isNotEqualTo []) exitWith { + ERROR_MSG_1("Vehicle (%1) must be empty.",_vehicle); + }; }; // Don't add event if JIP and it's already been removed. diff --git a/addons/mission/functions/fnc_lockDoors.sqf b/addons/mission/functions/fnc_lockDoors.sqf index 74a01015..80fc6341 100644 --- a/addons/mission/functions/fnc_lockDoors.sqf +++ b/addons/mission/functions/fnc_lockDoors.sqf @@ -23,14 +23,16 @@ params ["_building", ["_doorIndex", []], ["_lockState", 1], ["_isGlobal", true]] // If running globally, exit if not the server. if (_isGlobal && !isServer) exitWith {}; -// Exit if door index array is empty -if (_doorIndex isEqualTo []) exitWith { - ERROR_MSG("Door Index is empty."); -}; +if (is3DENPreview) then { + // Exit if door index array is empty + if (_doorIndex isEqualTo []) exitWith { + ERROR_MSG("Door Index is empty."); + }; -// Check lockstate value is correct. -if !(_lockState in [0, 1]) exitWith { - ERROR_MSG_1("Lock State is invalid (%1), expected 0 or 1.",_lockState); + // Check lockstate value is correct. + if !(_lockState in [0, 1]) exitWith { + ERROR_MSG_1("Lock State is invalid (%1), expected 0 or 1.",_lockState); + }; }; { diff --git a/addons/mission/functions/fnc_setSleeping.sqf b/addons/mission/functions/fnc_setSleeping.sqf index ae1ecadb..e44b3f19 100644 --- a/addons/mission/functions/fnc_setSleeping.sqf +++ b/addons/mission/functions/fnc_setSleeping.sqf @@ -24,8 +24,10 @@ params ["_group", ["_asleep", true], ["_time", 0]]; if (!is3DENPreview && {hasInterface}) exitWith {}; -if (_group isEqualType "OBJECT") exitWith { - ERROR_MSG("Input only allows group, detected unit."); +if (is3DENPreview) then { + if (_group isEqualType "OBJECT") exitWith { + ERROR_MSG("Input only allows group, detected unit."); + }; }; private _units = units _group; diff --git a/addons/mission/functions/fnc_surrender.sqf b/addons/mission/functions/fnc_surrender.sqf index e18c7554..f2e6dd3e 100644 --- a/addons/mission/functions/fnc_surrender.sqf +++ b/addons/mission/functions/fnc_surrender.sqf @@ -22,8 +22,10 @@ params ["_group", ["_surrenderChance", 5], ["_minimumDistance", 400], ["_rallyCh if (!is3DENPreview && {hasInterface}) exitWith {}; -if (_group isEqualType "OBJECT") exitWith { - ERROR_MSG("Input only allows group, detected unit."); +if (is3DENPreview) then { + if (_group isEqualType "OBJECT") exitWith { + ERROR_MSG("Input only allows group, detected unit."); + }; }; _group setVariable [QGVAR(surrenderParams), [_surrenderChance, _minimumDistance, _rallyChance], true];