Attempt to make enum errors more clear (#5876)

* Add note to enum script error

* Bump Arma/CBA versions

* req 1.78
This commit is contained in:
PabstMirror 2017-12-08 21:39:35 -06:00 committed by GitHub
parent 82f3a57e22
commit 61c99cb5d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

View File

@ -48,15 +48,16 @@
[QGVAR(setHidden), {
params ["_object", "_set"];
TRACE_2("setHidden EH",_object,_set);
private _visibility = _object getUnitTrait "camouflageCoef";
INFO("Note: getUnitTrait / camouflageCoef enum error can be ignored [present since Arma 3 v1.78] - IGNORE THIS");
private _vis = _object getUnitTrait "camouflageCoef";
if (_set > 0) then {
if (_visibility != 0) then {
_object setVariable [QGVAR(oldVisibility), _visibility];
if (_vis != 0) then {
_object setVariable [QGVAR(oldVisibility), _vis];
_object setUnitTrait ["camouflageCoef", 0];
};
} else {
_visibility = _object getVariable [QGVAR(oldVisibility), _visibility];
_object setUnitTrait ["camouflageCoef", _visibility];
_vis = _object getVariable [QGVAR(oldVisibility), _vis];
_object setUnitTrait ["camouflageCoef", _vis];
};
}] call CBA_fnc_addEventHandler;

View File

@ -9,8 +9,8 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.76
#define REQUIRED_CBA_VERSION {3,4,1}
#define REQUIRED_VERSION 1.78
#define REQUIRED_CBA_VERSION {3,5,0}
#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED)

View File

@ -40,7 +40,7 @@ private _absLoad = getNumber (configFile >> "CfgInventoryGlobalVariable" >> "max
private _loadCoef = _unit getVariable QGVAR(loadCoef);
if (isNil "_loadCoef") then {
INFO("Note: getUnitTrait / loadCoef enum error can be ignored [present in Arma 3 v1.78+]");
INFO("Note: getUnitTrait / loadCoef enum error can be ignored [present since Arma 3 v1.78] - IGNORE THIS");
_loadCoef = _unit getUnitTrait "loadCoef";
_unit setVariable [QGVAR(loadCoef), _loadCoef, true];
};