{"name":"BIS_fnc_getServerVariable","operator":null,"title":"BIS fnc getServerVariable","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_getServerVariable","revid":349343,"updated":"2023-11-08T14:53:30Z","groups":["Variables"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Fetch a variable saved on server.\nUsed when you want to share variables only to specific clients to prevent large traffic.\nMust be run in scheduled environment because communication with server takes some time.","syntaxes":[{"syntax":"[target, varName, default] call BIS_fnc_getServerVariable","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Namespace, Object or Group","optional":false,"default":null,"description":"variable name space","types":["Namespace","Object","Group"],"since":null,"text":"target: Namespace, Object or Group - variable name space"},{"name":"varName","type":"String","optional":false,"default":null,"description":"variable name","types":["String"],"since":null,"text":"varName: String - variable name"},{"name":"default","type":"Anything","optional":false,"default":null,"description":"default value returned when variable is nil","types":["Anything"],"since":null,"text":"default: Anything - default value returned when variable is nil"}],"returns":{"type":"Anything","types":["Anything"],"description":"default value or saved variable","text":"Anything - default value or saved variable"}}],"examples":[{"text":"```sqf\n[missionNamespace, \"BIS_someVar\", \"defaultValue\"] call BIS_fnc_getServerVariable;\n```","code":["[missionNamespace, \"BIS_someVar\", \"defaultValue\"] call BIS_fnc_getServerVariable;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getVariable","setVariable","allVariables"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Variables","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}