{"name":"BIS_fnc_priorityQueue_PushItem","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.86"}],"since":{"game":"arma3","name":"Arma 3","version":"1.86"},"arma3_since":"1.86","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"_handle","type":"Number","types":["Number"],"optional":false,"default":null,"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","since":null,"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","types":["Boolean"],"description":null,"text":"_success:BOOL - true if item was inserted into the Queue, otherwise false","source":"docblock"}}],"examples":[{"text":"```sqf\n_s = [_priorityQueue_1, \"myItem\", 5] call BIS_fnc_PriorityQueue_InsertItem;\n```","code":["_s = [_priorityQueue_1, \"myItem\", 5] call BIS_fnc_PriorityQueue_InsertItem;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Priority Queue","Functions","Introduced with Arma 3 version 1.86"],"docblock":{"author":"Zozo","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)","params":[{"index":null,"name":"_handle","types":["Number"],"optional":false,"default":null,"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"}],"returns":{"types":["Boolean"],"text":"_success:BOOL - true if item was inserted into the Queue, otherwise false"},"examples":["_s = [_priorityQueue_1, \"myItem\", 5] call BIS_fnc_PriorityQueue_InsertItem;"],"syntax":"_success:BOOL = [_handle, _item, _priority] call BIS_fnc_PriorityQueue_InsertItem;","execution":null,"notes":null,"requirements":null,"meta":{},"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;"},"filled_from_docblock":["description","params","returns","examples"]}