{"name":"BIS_fnc_priorityQueue_PushItem","title":"BIS fnc priorityQueue PushItem","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_priorityQueue_PushItem","revid":274278,"updated":"2021-06-13T01:19:56Z","groups":["Priority Queue"],"status":"ok","games":{"arma3":"1.86"},"since":"arma3 1.86","arma3_since":"1.86","description":"/*\n\nInserts item with a defined priority to the Queue The Priority Queue is sorted on inserting. Bigger numbers are set on higher indexes. Complexity: O(n)","syntaxes":[{"syntax":"[] call BIS_fnc_priorityQueue_PushItem","params":[{"name":"_handle","type":"Number","type_expr":"Number","description":"Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n_item:ANY - item, can be whatever\n_priority:INT - the priority the item is inserted with","text":"INT - Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n_item:ANY - item, can be whatever\n_priority:INT - the priority the item is inserted with","source":"docblock"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if item was inserted into the Queue, otherwise false","text":"_success:BOOL - true if item was inserted into the Queue, otherwise false","source":"docblock"}}],"examples":[{"code":["_s = [_priorityQueue_1, \"myItem\", 5] call BIS_fnc_PriorityQueue_InsertItem;"]}],"docblock":{"text":"/*\n    Author: Zozo\n\n    Description:\n    Inserts item with a defined priority to the Queue\n    The Priority Queue is sorted on inserting. Bigger numbers are set on higher indexes.\n    Complexity: O(n)\n\n    Parameters:\n    _handle:INT - Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n    _item:ANY - item, can be whatever\n    _priority:INT - the priority the item is inserted with\n\n    Returns:\n    _success:BOOL - true if item was inserted into the Queue, otherwise false\n\n    Syntax:\n    _success:BOOL = [_handle, _item, _priority] call BIS_fnc_PriorityQueue_InsertItem;\n\n    Example:\n    _s = [_priorityQueue_1, \"myItem\", 5] call BIS_fnc_PriorityQueue_InsertItem;","author":"Zozo"},"filled_from_docblock":["description","params","returns","examples"]}