{"name":"compileScript","operator":null,"title":"compileScript","type":"command","url":"https://community.bistudio.com/wiki/compileScript","revid":365141,"updated":"2024-07-26T16:44:13Z","groups":["System"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.02"}],"since":{"game":"arma3","name":"Arma 3","version":"2.02"},"arma3_since":"2.02","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"This command is an alias for `compile(Final) (prefixHeader + preprocessFileLineNumbers path)`. See description of preprocessFileLineNumbers for more details.\n\nIn addition, this command can also compile SQF Bytecode files, which can reduce compilation time. If both a .sqf file and .sqfc file are pressing in the the path, this command will automatically compile the .sqfc file.","syntaxes":[{"syntax":"compileScript [path, final, prefixHeader]","since":null,"effect":null,"exec":null,"params":[{"name":"path","type":"String","optional":false,"default":null,"description":"path to script file","types":["String"],"since":null,"text":"path: String - path to script file"},{"name":"final","type":"Boolean","optional":true,"default":"false","description":"compile final, see compileFinal","types":["Boolean"],"since":null,"text":"final: Boolean - (Optional, default false) compile final, see compileFinal"},{"name":"prefixHeader","type":"String","optional":true,"default":"\"\"","description":"value added at the beginning of the file","types":["String"],"since":null,"text":"prefixHeader: String - (Optional, default \"\") value added at the beginning of the file"}],"returns":{"type":"Code","types":["Code"],"description":null,"text":"Code"},"form":"unary","operator":null,"left":null,"right":{"text":"[path, final, prefixHeader]","types":["Array"]}}],"examples":[{"text":"```sqf\ncompileScript [\"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\"];\n// has the same functionality as \ncompile preprocessFileLineNumbers \"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\";\n```","code":["compileScript [\"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\"];\n// has the same functionality as \ncompile preprocessFileLineNumbers \"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["compile","compileFinal","preprocessFileLineNumbers","preprocessFile","call","spawn"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: System","Introduced with Arma 3 version 2.02","Scripting Commands"]}