conform isnil checking: common

This commit is contained in:
Whigital 2020-02-11 23:42:08 +01:00
parent 2688cdd95f
commit 80352519e1
6 changed files with 7 additions and 7 deletions

View File

@ -73,7 +73,7 @@ GVAR(settingsMovedToSQF) = [];
#ifdef DEBUG_MODE_FULL
INFO_1("checking settingsMovedToSQF [%1]",count GVAR(settingsMovedToSQF));
{
if (isNil _x) then { WARNING_1("setting [%1] NOT moved to sqf",_x); };
if (isNil "_x") then { WARNING_1("setting [%1] NOT moved to sqf",_x); };
} forEach GVAR(settingsMovedToSQF);
#endif
}] call CBA_fnc_addEventHandler;
@ -107,7 +107,7 @@ for "_index" from 0 to (_countOptions - 1) do {
if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then {
WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName);
} else {
if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then {
if ((isNil "_settingName") && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then {
// New setting, that was first defined in missionConfigFile
INFO_1("Creating new CBA setting for ace_setting from mission config [%1]",_settingName);
[_optionEntry] call FUNC(cbaSettings_loadFromConfig);

View File

@ -43,7 +43,7 @@ if (_checkNil) then {
private _nilCheckedList = [];
{
if !(isNil _x) then {
if (!isNil "_x") then {
_nilCheckedList pushBack (missionNamespace getVariable _x);
};
false

View File

@ -22,7 +22,7 @@
params ["_logic", "_settingName", "_moduleVariable"];
// Check if the variable is already defined
if (isNil _settingName) exitWith {
if (isNil "_settingName") exitWith {
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName);
};

View File

@ -31,7 +31,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
TRACE_3("ace_setting",_title,_settingName,_settingValue);
// Check if the variable is already defined
if (isNil _settingName) exitWith {
if (isNil "_settingName") exitWith {
ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
};

View File

@ -33,7 +33,7 @@ if (isLocalized _requestMessage) then {
hint format ["%1", _requestMessage]; // @todo ?
if !(isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
};

View File

@ -23,7 +23,7 @@ _unit setVariable ["ACE_isUnconscious", nil, true];
if (isPlayer _unit) then {
[true] call FUNC(setVolume);
if !(isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
if (!isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
// clear all disable user input
{
[_x, false] call FUNC(setDisableUserInputStatus);