{"name":"BIS_fnc_getServerVariable","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","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","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","params":[{"name":"target","type":"Namespace, Object or Group","description":"variable name space","type_expr":"Namespace | Object | Group"},{"name":"varName","type":"String","description":"variable name","type_expr":"String"},{"name":"default","type":"Anything","description":"default value returned when variable is nil","type_expr":"Anything"}],"returns":{"type":"Anything","type_expr":"Anything","description":"default value or saved variable"}}],"examples":[{"code":["[missionNamespace, \"BIS_someVar\", \"defaultValue\"] call BIS_fnc_getServerVariable;"]}],"see_also":["getVariable","setVariable","allVariables"]}