{"name":"BIS_fnc_variableSpaceAdd","operator":null,"title":"BIS fnc variableSpaceAdd","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_variableSpaceAdd","revid":337310,"updated":"2023-01-15T12:01:18Z","groups":["Variables"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Add element to variable from someone's variable space.","syntaxes":[{"syntax":"[object, varName, element, global, inArray] call BIS_fnc_variableSpaceAdd","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"owner of variable space","types":["Object"],"since":null,"text":"object: Object - owner of variable space"},{"name":"varName","type":"String","optional":false,"default":null,"description":"name of variable","types":["String"],"since":null,"text":"varName: String - name of variable"},{"name":"element","type":"Anything","optional":false,"default":null,"description":"element which will be added (must be of same type as variable)","types":["Anything"],"since":null,"text":"element: Anything - element which will be added (must be of same type as variable)"},{"name":"global","type":"Boolean","optional":true,"default":"false","description":"true to save modified variable globally","types":["Boolean"],"since":null,"text":"global: Boolean - (Optional, default false) true to save modified variable globally"},{"name":"inArray","type":"Boolean","optional":true,"default":"false","description":"true to check if element is already in variable (only for Arrays)","types":["Boolean"],"since":null,"text":"inArray: Boolean - (Optional, default false) true to check if element is already in variable (only for Arrays)"}],"returns":{"type":"Anything","types":["Anything"],"description":"updated variable","text":"Anything - updated variable"}}],"examples":[{"text":"```sqf\n[player, \"someVar\", 1337, true, true] call BIS_fnc_variableSpaceAdd;\n```","code":["[player, \"someVar\", 1337, true, true] call BIS_fnc_variableSpaceAdd;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_variableSpaceRemove"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Variables","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}