---
name: "BIS_fnc_priorityQueue_Init"
type: function
status: ok
groups: ["Priority Queue"]
arma3_since: "1.86"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_priorityQueue_Init
revid: 274279
updated: 2021-06-13T01:19:56Z
---

# BIS_fnc_priorityQueue_Init

*Function · Priority Queue · Arma 3 v1.86*

## Description

/*

Initialize the Priority Queue data structure. The Priority Queue is sorted on inserting. Bigger numbers are set on higher indexes.

## Syntax

```sqf
[] call BIS_fnc_priorityQueue_Init
```

**Parameters:**

- `_maxSize` — INT - OPTIONAL, sets the Queue MAX SIZE (otherwise it is set to the constant defined in the .inc file)

**Returns:** _handle: Handle to the Queue (essential for manipulation with the Queue)

## Examples

### Example 1

```sqf
_priorityQueue_1 = [10] call BIS_fnc_PriorityQueue_Init;
```

## Function header

The comment at the top of the function's file in the game; this page's description, params, returns, examples come from it.

```sqf
/*
/*
    Author: Zozo

    Description:
    Initialize the Priority Queue data structure.
    The Priority Queue is sorted on inserting. Bigger numbers are set on higher indexes.

    Parameters:
    _maxSize:INT - OPTIONAL, sets the Queue MAX SIZE (otherwise it is set to the constant defined in the .inc file)

    Returns:
    _handle: Handle to the Queue (essential for manipulation with the Queue)

    Syntax:
    _handle:INT = [_maxSize] call BIS_fnc_PriorityQueue_Init;

    Example:
    _priorityQueue_1 = [10] call BIS_fnc_PriorityQueue_Init;
*/
```

<sub>Source: [BI Community Wiki — BIS fnc priorityQueue Init](https://community.bistudio.com/wiki/BIS_fnc_priorityQueue_Init) (revision 274279).</sub>
