{"name":"exec","operator":null,"title":"exec","type":"command","url":"https://community.bistudio.com/wiki/exec","revid":325305,"updated":"2022-07-10T22:55:34Z","groups":["Program Flow"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Execute a script using (the deprecated but still available) SQS Syntax. SQF Syntax (and execVM) is the most recent scripting language.\n\nThe magic variable _time used within the script contains the elapsed time in seconds since the script started.\n\n> [!NOTE]\n> To see the active SQS scripts currently in the scheduler, use diag_activeSQSScripts command.","syntaxes":[{"syntax":"argument exec script","since":null,"effect":null,"exec":null,"params":[{"name":"argument","type":"Anything","optional":false,"default":null,"description":"the argument passed to the script through the _this variable. To pass multiple arguments, use an Array.","types":["Anything"],"since":null,"text":"argument: Anything - the argument passed to the script through the _this variable. To pass multiple arguments, use an Array."},{"name":"script","type":"String","optional":false,"default":null,"description":"the file path to the script. It should be given relatively to the mission folder, campaign scripts subfolder or global scripts folder and is searched there in the same order.\nIf you refer to a script packed together with an addon, the path should look like this: \"\\ADDON_PBO_NAME\\script.sqs\" where ADDON_PBO_NAME is the name of the addon's PBO file without extension.","types":["String"],"since":null,"text":"script: String - the file path to the script. It should be given relatively to the mission folder, campaign scripts subfolder or global scripts folder and is searched there in the same order.\nIf you refer to a script packed together with an addon, the path should look like this: \"\\ADDON_PBO_NAME\\script.sqs\" where ADDON_PBO_NAME is the name of the addon's PBO file without extension."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"argument","types":["Anything"]},"right":{"text":"script","types":["String"]}}],"examples":[{"text":"```sqs\n[player, _jeep] exec \"getin.sqs\";\n```","code":["[player, _jeep] exec \"getin.sqs\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["execVM","call","spawn","execFSM"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Program Flow","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}