Advertisement
Guest User

Untitled

a guest
Jul 1st, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /*
  2. File: fn_levelCheck.sqf
  3. Author: BoGuu
  4.  
  5. Description:
  6. xx
  7. */
  8.  
  9. if !(params [["_itemConfig", [], [[],""]]]) exitWith {};
  10.  
  11. scopeName "main";
  12.  
  13. private _return = false;
  14.  
  15. if (_itemConfig isEqualTo []) exitWith {diag_log localize "STR_NOTF_emptyArray_levelCheck"; _return};
  16.  
  17. if (_itemConfig isEqualType []) then {
  18. private _lastElement = _itemConfig select (count _itemConfig - 1);
  19. if (_lastElement isEqualType "") then {
  20. _itemConfig = _lastElement;
  21. } else {
  22. true breakOut "main";
  23. };
  24. };
  25.  
  26. if (_itemConfig isEqualTo "") exitWith {true};
  27.  
  28. private _evaluation = call compile _itemConfig;
  29.  
  30. if (_evaluation isEqualType true) then {
  31. if (_evaluation) then {
  32. _return = true;
  33. };
  34. } else {
  35. _return = true;
  36. };
  37.  
  38. _return;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement