{"name":"continueWith","operator":null,"title":"continueWith","type":"command","url":"https://community.bistudio.com/wiki/continueWith","revid":378202,"updated":"2026-03-12T15:42:26Z","groups":["Program Flow"],"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":"Skips the current loop iteration, continues with the next one and returns the given value.","syntaxes":[{"syntax":"continueWith return","since":null,"effect":null,"exec":null,"params":[{"name":"return","type":"Anything","optional":false,"default":null,"description":"value to be returned when iteration is skipped","types":["Anything"],"since":null,"text":"return: Anything - value to be returned when iteration is skipped"}],"returns":{"type":"Anything","types":["Anything"],"description":null,"text":"Anything"},"form":"unary","operator":null,"left":null,"right":{"text":"return","types":["Anything"]}},{"syntax":"scriptHandle continueWith code","since":"arma3 2.22","effect":null,"exec":null,"params":[{"name":"scriptHandle","type":"Script Handle","optional":false,"default":null,"description":null,"types":["Script Handle"],"since":null,"text":"scriptHandle: Script Handle"},{"name":"code","type":"Code","optional":false,"default":null,"description":"Code to execute once the Promise has completed. The code will be executed in Unscheduled Environment.","types":["Code"],"since":null,"text":"code: Code - Code to execute once the Promise has completed. The code will be executed in Unscheduled Environment."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"scriptHandle","types":["Script Handle"]},"right":{"text":"code","types":["Code"]}},{"syntax":"scriptHandle continueWith [code, args]","since":"arma3 2.22","effect":null,"exec":null,"params":[{"name":"scriptHandle","type":"Script Handle","optional":false,"default":null,"description":null,"types":["Script Handle"],"since":null,"text":"scriptHandle: Script Handle"},{"name":"code","type":"Code","optional":false,"default":null,"description":"Code to execute once the Promise has completed. The code will be executed in Unscheduled Environment.","types":["Code"],"since":null,"text":"code: Code - Code to execute once the Promise has completed. The code will be executed in Unscheduled Environment."},{"name":"args","type":"Anything","optional":false,"default":null,"description":"Arguments passed into code in _thisArgs variable","types":["Anything"],"since":null,"text":"args: Anything - Arguments passed into code in _thisArgs variable"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"scriptHandle","types":["Script Handle"]},"right":{"text":"[code, args]","types":["Array"]}}],"examples":[{"text":"```sqf\n// results in [2, \"TEST\", 4]\nprivate _result = [1, 2, 3] apply {\n    if (_x == 2) then {\n        continueWith \"TEST\";\n    } else {\n        _x + 1;\n    };\n};\n```","code":["// results in [2, \"TEST\", 4]\nprivate _result = [1, 2, 3] apply {\n\tif (_x == 2) then {\n\t\tcontinueWith \"TEST\";\n\t} else {\n\t\t_x + 1;\n\t};\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["continue","break","breakWith"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Program Flow","Introduced with Arma 3 version 2.02","Scripting Commands"]}