Fixed default duration value in module init, Added error if required fields left empty, Combined 2 lines

This commit is contained in:
jonpas 2015-07-12 16:32:48 +02:00
parent f08bd7acc2
commit b83b161e3d
2 changed files with 5 additions and 3 deletions

View File

@ -29,8 +29,7 @@ _splittedList = [_list, ","] call BIS_fnc_splitString;
_listNoWhitespace = [];
if (_removeWhitespace) then {
{
_x = [_x] call EFUNC(common,stringRemoveWhiteSpace);
_listNoWhitespace pushBack _x;
_listNoWhitespace pushBack ([_x] call EFUNC(common,stringRemoveWhiteSpace));
} forEach _splittedList;
_list = _listNoWhitespace;
};

View File

@ -31,7 +31,10 @@ _objects = [_logic getVariable ["Objects", ""], true, true] call FUNC(makeList);
_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList);
_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList);
_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList);
_duration = _logic getVariable ["Duration", ""];
_duration = _logic getVariable ["Duration", 0];
// Exit if Images or Names fields are empty
if (_images == "" || {_names == ""}) exitWith {diag_log "[ACE] ERROR: Slideshow Module NOT Initialized: Images or Names fields can NOT be empty!"};
// Prepare with actions
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);