Skip to content

Commit

Permalink
Just warn for old compat pbos (#5177)
Browse files Browse the repository at this point in the history
* Just warn for old compat pbos

* Use CBA_fnc_error big warning box

* fix caps
  • Loading branch information
PabstMirror authored May 22, 2017
1 parent cd5dcf5 commit d4a6caf
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions addons/common/functions/fnc_checkFiles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,29 @@ private _addons = "true" configClasses (configFile >> "CfgPatches");//
_addons = _addons apply {toLower configName _x};//
_addons = _addons select {_x find "ace_" == 0};

private _oldCompats = [];
{
if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then {
private _errorMsg = format ["File %1.pbo is outdated.", _x];

ERROR(_errorMsg);

if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
if ((_x select [0, 10]) != "ace_compat") then {
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
} else {
_oldCompats pushBack _x; // Don't block game if it's just an old compat pbo
};
};
false
} count _addons;
if (!(_oldCompats isEqualTo [])) then {
[{
// Lasts for ~10 seconds
ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this);
}, _oldCompats, 1] call CBA_fnc_waitAndExecute;
};

///////////////
// check dlls
Expand Down

0 comments on commit d4a6caf

Please sign in to comment.