gruppe-adler / gruppe_adler_mod

Gruppe Adler Mod is a collection of Gruppe Adler original addons that add new functionality or modify and improve existing functionality to suit our Arma gameplay.
GNU General Public License v2.0
10 stars 6 forks source link

versionCheck: fn_createDiaryEntry.sqf breaks when AdvDevTools is loaded #211

Closed b-mayr-1984 closed 2 months ago

b-mayr-1984 commented 2 months ago

In CfgPatches AdvDevTools 3.0 defines version[] as an Array. image

This fact causes a problem in this LOC https://github.com/gruppe-adler/gruppe_adler_mod/blob/c0c5d2cd9aa990ccc95ffdd1fdc04d93c693e9ea/addons/versionCheck/functions/fn_createDiaryEntry.sqf#L20 due to an inappropriate type:

13:12:50 Error in expression <_a resize (_targetLen - _strLen);
(_str + ((_a apply {" "}) joinString ""));
};
>
13:12:50   Error position: <+ ((_a apply {" "}) joinString ""));
};
>
13:12:50   Error Generic error in expression
13:12:50 File x\grad\addons\versionCheck\functions\fn_createDiaryEntry.sqf..., line 20

It appears that AdvDevTools is not following convention here. image image

However fn_createDiaryEntry.sqf should still keep functioning even if some mods don't follow conventions.

b-mayr-1984 commented 2 months ago

With changes in a0c85e5a600ace1ecadbbd0ca123400c029e5511 the function is restored. image

One just has to live with this warning message. image

17:25:36 Error in expression <_maxLines =  2000 }; 

private _pad = {
params [["_str", "wrong_type", ["string">
17:25:36   Error position: <params [["_str", "wrong_type", ["string">
17:25:36   Error Params: Type Array, expected String
17:25:36 File x\grad\addons\versionCheck\functions\fn_createDiaryEntry.sqf, line 9

But this is still better than the feature simply not working at all if AdvDevTools is loaded.