Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions cScripts/functions/testing/fn_testing_loadoutArrays.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,70 +53,70 @@ private _classnameList = configProperties [missionconfigfile >> "CfgLoadouts", "
switch (_forEachIndex) do {
private _element = _x;
case 0: {
if (_element typeName != "ARRAY") then {
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Primary Weapon is not a array got %2", _class, _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 1: {
if (_element typeName != "ARRAY") then {
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Secondary Weapon is not a array got %2", _class, _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 2: {
if (_element typeName != "ARRAY") then {
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Handgun Weapon is not a array got %2", _class, _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 3: {
if (_element typeName != "ARRAY") then {
[format["FAILED: Loadout %1 Uniform is not a array got %2", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Uniform is not a array got %2", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 4: {
if (_element typeName != "ARRAY") then {
[format["FAILED: Loadout %1 Vest is not a array got %2", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Vest is not a array got %2", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
case 5: {
if (_element typeName != "ARRAY") then {
[format["FAILED: Loadout %1 Backpack is not a array got %2", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Backpack is not a array got %2", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 6: {
if (_element typeName != "STRING") then {
[format["FAILED: Loadout %1 Headgear is not a string got %1", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "STRING") then {
[format["FAILED: Loadout %1 Headgear is not a string got %1", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 7: {
if (_element typeName != "STRING") then {
[format["FAILED: Loadout %1 Goggles/Facewear is not a string got %1", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "STRING") then {
[format["FAILED: Loadout %1 Goggles/Facewear is not a string got %1", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 8: {
if (_element typeName != "ARRAY") then {
[format["FAILED: Loadout %1 Binoculars is not a array got %2", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Binoculars is not a array got %2", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
};
case 9: {
if (_element typeName != "ARRAY") then {
[format["FAILED: Loadout %1 Assigned Items is not a array got %2", _class, _element typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _element != "ARRAY") then {
[format["FAILED: Loadout %1 Assigned Items is not a array got %2", _class, typeName _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
if (count _element != 6) then {
[format["FAILED: Loadout %1 Assigned Items size array is wrong expected 6 got %2", _class, count _element], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
};
{
if (_x typeName != "STRING") then {
[format["FAILED: Loadout %1 Assigned Items expected item in string got %2", _class, _x typeName], "FAILED", true, false, "TESTING"] call FUNC(log);
if (typeName _x != "STRING") then {
[format["FAILED: Loadout %1 Assigned Items expected item in string got %2", _class, typeName _x], "FAILED", true, false, "TESTING"] call FUNC(log);
_return = false;
}
} forEach _element;
Expand Down