{"name":"exec","title":"exec","type":"command","url":"https://community.bistudio.com/wiki/exec","revid":325305,"updated":"2022-07-10T22:55:34Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Execute a script using (the deprecated but still available) SQS Syntax. SQF Syntax (and execVM) is the most recent scripting language.\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","params":[{"name":"argument","type":"Anything","description":"the argument passed to the script through the _this variable. To pass multiple arguments, use an Array.","type_expr":"Anything"},{"name":"script","type":"String","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.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"argument"},"right":{"text":"script"}}],"examples":[{"text":"```sqs\n[player, _jeep] exec \"getin.sqs\";\n```","code":["[player, _jeep] exec \"getin.sqs\";"]}],"see_also":["execVM","call","spawn","execFSM"]}