{"name":"BIS_fnc_loadFunctions","operator":null,"title":"BIS fnc loadFunctions","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_loadFunctions","revid":352078,"updated":"2024-02-01T23:24:43Z","groups":["Diagnostic"],"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":"Compile scripts and save them into globally available functions. Defines _fnc_scriptName variable.","syntaxes":[{"syntax":"[fileDirectory, prefix, nameVars, global] call BIS_fnc_loadFunctions","since":null,"effect":null,"exec":null,"params":[{"name":"fileDirectory","type":"String","optional":false,"default":null,"description":"script path","types":["String"],"since":null,"text":"fileDirectory: String - script path"},{"name":"prefix","type":"String","optional":false,"default":null,"description":"variable prefix \n\n> [!NOTE]\n> `\"BIS_fnc_\"` prefix is reserved and cannot be used.","types":["String"],"since":null,"text":"prefix: String - variable prefix \n\n> [!NOTE]\n> `\"BIS_fnc_\"` prefix is reserved and cannot be used."},{"name":"nameVars","type":"Array of Strings or Array of Array","optional":false,"default":null,"description":"list of variables to be declared.\n- Array of Strings to format [variable, variable, …] - final variable is `prefix + variable`, loaded from `path + variable + \".sqf\"`\n- Array of Array to format [[variable, fileName], [variable, fileName], …] - final variable is `prefix + variable`, loaded from `path + fileName + \".sqf\"`","types":["Array","String"],"since":null,"text":"nameVars: Array of Strings **or** Array of Array - list of variables to be declared.\n- Array of Strings to format [variable, variable, …] - final variable is `prefix + variable`, loaded from `path + variable + \".sqf\"`\n- Array of Array to format [[variable, fileName], [variable, fileName], …] - final variable is `prefix + variable`, loaded from `path + fileName + \".sqf\"`"},{"name":"global","type":"Boolean","optional":false,"default":null,"description":"true for global persistent execution on all clients","types":["Boolean"],"since":null,"text":"global: Boolean - true for global persistent execution on all clients"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when done","text":"Boolean - true when done"}}],"examples":[{"text":"```sqf\n[\"scripts\\myDir\\\", \"MY_fnc_\", [\"script1\", \"script2\"], true] call BIS_fnc_loadFunctions;\n```","code":["[\"scripts\\myDir\\\", \"MY_fnc_\", [\"script1\", \"script2\"], true] call BIS_fnc_loadFunctions;"]},{"text":"```sqf\n[\"scripts\\myDir\\\", \"MY_fnc_\", [[\"script1\", \"script1file\"], [\"script2\", \"script2file\"]], false] call BIS_fnc_loadFunctions;\n```","code":["[\"scripts\\myDir\\\", \"MY_fnc_\", [[\"script1\", \"script1file\"], [\"script2\", \"script2file\"]], false] call BIS_fnc_loadFunctions;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["compile","compileFinal","preprocessFileLineNumbers"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Diagnostic","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}