_msg = ... _restype = _msg select 2; _resources = _msg select 3; _free = false; switch (_restype) do { case "ELE": { _ele = _resources select 0; _elevators = _nim getVariable "ttt_fo_elevators"; if (find _ele in _elevators) { _free = true; }; }; ... }; _free;