Arma 3 Scripting

BIS_fnc_swapVars

  • Arma 3 v0.50
  • First in Arma 2 v1.00

Function · Markdown · JSON · original wiki page

Description

Swaps the values of two variables passed as String.

Nothing is returned as this function modifies the variables directly.

Syntax

[variableName1, variableName2] call BIS_fnc_swapVars

Parameters:

Returns: Nothing

Examples

Example 1

private _a = 1;
_b = 2;
["_a", "_b"] call BIS_fnc_swapVars;
_a == 2; // true
_b == 1; // true