---
name: "BIS_fnc_setServerVariable"
type: function
status: ok
groups: ["Variables"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_setServerVariable
revid: 327933
updated: 2022-07-13T12:34:00Z
---

# BIS_fnc_setServerVariable

*Function · Variables · Arma 3 v1.00*

## Description

Set variable stored only on server. Clients can the download it using [BIS_fnc_getServerVariable](../functions/BIS_fnc_getServerVariable.md). Used when you want to share variables only to specific clients to prevent large traffic.

## Syntax

```sqf
[namespace, varName, value] call BIS_fnc_setServerVariable
```

**Parameters:**

- `namespace`: [Namespace](../topics/Namespace.md), [Object](../topics/Object.md) or [Group](../topics/Group.md) - (Optional, default [missionNamespace](../commands/missionNamespace.md))
- `varName`: [String](../topics/String.md) - variable name
- `value`: [Anything](../topics/Anything.md) - variable value

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) when done

## Examples

### Example 1

```sqf
[nil, "playerHealth", damage player] call BIS_fnc_setServerVariable;
```

### Example 2

```sqf
[player, "playerHealth", damage player] call BIS_fnc_setServerVariable;
```

## See also

[BIS_fnc_getServerVariable](../functions/BIS_fnc_getServerVariable.md) · [publicVariableServer](../commands/publicVariableServer.md) · [publicVariableClient](../commands/publicVariableClient.md)

<sub>Source: [BI Community Wiki — BIS fnc setServerVariable](https://community.bistudio.com/wiki/BIS_fnc_setServerVariable) (revision 327933).</sub>
