mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Error handling for bad setting values array
This commit is contained in:
parent
8d4364350c
commit
a42c2153cc
@ -38,7 +38,12 @@ switch (GVAR(optionMenu_openTab)) do {
|
||||
_settingsText = if ((_x select 1) == "BOOL") then {
|
||||
[(localize ELSTRING(common,No)), (localize ELSTRING(common,Yes))] select _settingsValue;
|
||||
} else {
|
||||
(_x select 5) select _settingsValue;
|
||||
private _values = _x select 5;
|
||||
if !((!isNil "_values") && {_values isEqualType []} && {_settingsValue >= 0} && {_settingsValue < (count _values)}) exitWith {
|
||||
ACE_LOGERROR_3("Setting (%1) has bad values (%2) for index (%3)", _settingName, _values, _settingsValue);
|
||||
"ERROR"
|
||||
};
|
||||
_values select _settingsValue;
|
||||
};
|
||||
_added = _ctrlList lnbAddRow [_settingName, _settingsText];
|
||||
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
|
||||
|
Loading…
Reference in New Issue
Block a user