---
name: "publicVariableServer"
type: command
status: ok
groups: ["Multiplayer", "Variables"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/publicVariableServer
revid: 363982
updated: 2024-04-29T23:08:24Z
---

# publicVariableServer

*Command · Multiplayer, Variables · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.62*

## Description

Send the variable value to the server - same limitations regarding variable type as [publicVariable](../commands/publicVariable.md#description).

> [!NOTE]
> **Arma 3:** In Arma 3 it is possible to broadcast the [nil](../commands/nil.md) value.

## Syntax

```sqf
publicVariableServer varName
```

**Parameters:**

- `varName`: [String](../topics/String.md)

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

## Examples

### Example 1

```sqf
publicVariableServer "CTFscoreOne";
```

## See also

[publicVariable](../commands/publicVariable.md) · [publicVariableClient](../commands/publicVariableClient.md) · [addPublicVariableEventHandler](../commands/addPublicVariableEventHandler.md)

## Community notes

**Kylania** — 2012-08-24

- [publicVariableServer](../commands/publicVariableServer.md) (run on client)
- [publicVariableClient](../commands/publicVariableClient.md) (run on server)

Publishes the variable (name as [String](../topics/String.md)) to the server only.
Useful when you want to synchronise a variable with the server but not any other clients. - [](../commands/publicVariableServer.md)

<sub>Source: [BI Community Wiki — publicVariableServer](https://community.bistudio.com/wiki/publicVariableServer) (revision 363982).</sub>
