{"name":"publicVariableServer","operator":null,"title":"publicVariableServer","type":"command","url":"https://community.bistudio.com/wiki/publicVariableServer","revid":363982,"updated":"2024-04-29T23:08:24Z","groups":["Multiplayer","Variables"],"status":"ok","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"varName","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"varName: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"varName","types":["String"]}}],"examples":[{"text":"```sqf\npublicVariableServer \"CTFscoreOne\";\n```","code":["publicVariableServer \"CTFscoreOne\";"]}],"multiplayer":null,"problems":null,"aliases":[],"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)"}],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Command Group: Variables","Introduced with Arma 2: Operation Arrowhead version 1.62","Scripting Commands","Take On Helicopters: Scripting Commands"]}