{"name":"BIS_fnc_onEnd","title":"BIS fnc onEnd","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_onEnd","revid":329730,"updated":"2022-08-03T13:27:33Z","groups":["Event Handlers"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Register code to be executed after mission end.\n\n> [!NOTE]\n> **Arma 3:** Replaced by \"Ended\" mission event handler.\n> This function now exists only because of backward compatibility.","syntaxes":[{"syntax":"argument call BIS_fnc_onEnd","params":[{"name":"argument","type":"Code, Array or Number:","description":"Code, Array or Number:\n\n- Code - code to be executed\n- Array - code with arguments in format [code, arguments]\n- Number - remove code at given index","type_expr":"Code | Array | Number","text":"argument: Code, Array or Number:\n\n- Code - code to be executed\n- Array - code with arguments in format [code, arguments]\n- Number - remove code at given index"}],"returns":{"type":"Number","type_expr":"Number","description":"index of onEnd code"}}],"examples":[{"code":["private _onEndIndex = { player addRating 10000; } call BIS_fnc_onEnd;"]},{"code":["private _onEndIndex = [{ { _x addRating 10000; } forEach _this; }, units group player] call BIS_fnc_onEnd;"]}],"see_also":["Event Scripts","Arma 3: Mission Event Handlers"]}