From 7a9564f603f36ba89ca2b4bd5fb9a31d7d1a9987 Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 5 Oct 2016 13:55:48 +0200 Subject: [PATCH] fix formating of CBA version check --- addons/common/functions/fnc_checkFiles.sqf | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 072736353f7..a3ad83459bf 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -21,10 +21,15 @@ INFO_1("ACE is version %1.",_version); //CBA Versioning check - close main display if using incompatible version private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr"); -private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1; -INFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr); +private _cbaRequiredAr = getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA") select 1; + +private _cbaVersionStr = _cbaVersionAr joinString "."; +private _cbaRequiredStr = _cbaRequiredAr joinString "."; + +INFO_2("CBA is version %1 (min required %2)",_cbaVersionStr,_cbaRequiredStr); + if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then { - private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr]; + private _errorMsg = format ["CBA version %1 is outdated (required %2)", _cbaVersionStr, _cbaRequiredStr]; ERROR(_errorMsg); if (hasInterface) then { ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);