{"name":"publicVariableServer","title":"publicVariableServer","type":"command","url":"https://community.bistudio.com/wiki/publicVariableServer","revid":363982,"updated":"2024-04-29T23:08:24Z","groups":["Multiplayer","Variables"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Send the variable value to the server - same limitations regarding variable type as publicVariable.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 it is possible to broadcast the nil value.","syntaxes":[{"syntax":"publicVariableServer varName","params":[{"name":"varName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"varName"}}],"examples":[{"code":["publicVariableServer \"CTFscoreOne\";"]}],"see_also":["publicVariable","publicVariableClient","addPublicVariableEventHandler"],"notes":[{"user":"Kylania","date":"2012-08-24T02:06:00Z","text":"- publicVariableServer (run on client)\n- publicVariableClient (run on server)\n\nPublishes the variable (name as String) to the server only.\nUseful when you want to synchronise a variable with the server but not any other clients. - [Rocket](http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795)"}]}