---
name: "BIS_fnc_param"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_param
revid: 349153
updated: 2023-11-08T14:49:49Z
---

# BIS_fnc_param

*Function · Arrays · Arma 3 v0.50 · introduced in Take On Helicopters v1.00*

## Description

Load a script parameter. See [Arma 3: Functions Library](../topics/Functions_Library.md#loading-parameters) for detailed description.

> [!NOTE]
> **Arma 3:** Use [param](../commands/param.md) or [params](../commands/params.md) commands instead.

## Syntax

```sqf
[input, index, defaultValue, dataTypes, requiredCount] call BIS_fnc_param
```

**Parameters:**

- `input`: [Array](../topics/Array.md) - list of params
- `index`: [Number](../topics/Number.md) - selected index
- `defaultValue`: [Anything](../topics/Anything.md) - (Optional, default [Nothing](../topics/Nothing.md)) default param (used when param is missing or of wrong type).
  You can overload default value by declaring variable *BIS_fnc_<functionName>_<index>* in [Namespace](../topics/Namespace.md) where BIS_fnc_param is called from.
  [BIS_fnc_paramIn](../functions/BIS_fnc_paramIn.md) is a variant of the function with overloading disabled.
- `dataTypes`: [Array](../topics/Array.md) - (Optional, default [Anything](../topics/Anything.md)) list of allowed type examples (e.g. ["",[],0,[objNull](../commands/objNull.md)])
- `requiredCount`: [Number](../topics/Number.md) or [Array](../topics/Array.md) - (Optional) if value is Array, checks if it has required number of elements

**Returns:** [Anything](../topics/Anything.md)

## Examples

### Example 1

```sqf
_target = [_this, 0, objNull, [objNull,[]], [2,3]] call BIS_fnc_param;
```

- if (_this select 0) is not defined, default objnull is used.
- if (_this select 0) is defined, but is neither of type [Object](../topics/Object.md) nor [Array](../topics/Array.md), error message is logged and default [objNull](../commands/objNull.md) is used.
- if (_this select 0) and is [Array](../topics/Array.md), but it is count is neither 2 nor 3, error message is logged and default [objNull](../commands/objNull.md) is used.

### Example 2

```sqf
_answer = [_this, 1, 42] call BIS_fnc_param;
```

- if (_this select 1) is not defined, default 42 is used.
- no limit for data types or number of elements exists.

## See also

[BIS_fnc_paramIn](../functions/BIS_fnc_paramIn.md) · [param](../commands/param.md) · [params](../commands/params.md)

## Community notes

**ffur2007slx2_5** — 2014-09-06

Arma 3 v1.28 Use [BIS_fnc_paramIn](../functions/BIS_fnc_paramIn.md) to load private path from parent parameters (loaded by [BIS_fnc_param](../functions/BIS_fnc_param.md))

```sqf
private ["_parent", "_child0", "_child1"];
_parent = [_this, 0, [], [[]]] call BIS_fnc_param;
_child0 = [_parent, 0, missionNamespace, [missionNamespace, grpNull, objNull]] call BIS_fnc_paramIn;
_child1 = [_parent, 1, "", [""]] call BIS_fnc_paramIn;
```

<sub>Source: [BI Community Wiki — BIS fnc param](https://community.bistudio.com/wiki/BIS_fnc_param) (revision 349153).</sub>
