{"name":"BIS_fnc_onLoad","operator":null,"title":"BIS fnc onLoad","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_onLoad","revid":328472,"updated":"2022-07-13T16:11:09Z","groups":["Event Handlers"],"status":"ok","replaced_by":[],"games":[{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Register code to be executed after a mission load (from a save, for example).\n\n> [!IMPORTANT]\n> Replaced by \"loaded\" mission event handler.\n>\n> This function now exists only because of backward compatibility","syntaxes":[{"syntax":"parameter call BIS_fnc_onLoad","since":null,"effect":null,"exec":null,"params":[{"name":"parameter","type":"Code or Number:","optional":false,"default":null,"description":"Code or Number:\n- Code - code to be executed on mission load\n- Number - index of code to remove","types":["Code","Number"],"since":null,"text":"parameter: Code or Number:\n- Code - code to be executed on mission load\n- Number - index of code to remove"}],"returns":{"type":"Number","types":["Number"],"description":"index of onLoad code","text":"Number - index of onLoad code"}}],"examples":[{"text":"```sqf\nprivate _codeIndex = { hint \"Welcome back!\"; } call BIS_fnc_onLoad;\n```","code":["private _codeIndex = { hint \"Welcome back!\"; } call BIS_fnc_onLoad;"]},{"text":"```sqf\n0 call BIS_fnc_onLoad; // removes code with index 0\n```","code":["0 call BIS_fnc_onLoad; // removes code with index 0"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Mission Event Handlers","addMissionEventHandler"],"notes":[],"categories":["Arma 3: Functions","Function Group: Event Handlers","Functions","Introduced with Take On Helicopters version 1.00","Take On Helicopters: Functions","Take On Helicopters: New Functions"],"docblock":null,"filled_from_docblock":[]}