DCS func removeFunction

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: removeFunction Added with: 1.2.0
Member Of: timer
Syntax: function timer.removeFunction(number functionId )
Description: Removes a scheduled function as defined by the functionId from executing. Essentially will "destroy" the function.

Return Value: function
Return Example: none
Examples: The following will run a function named "main" 120 seconds from one the code would run.
 local id = timer.scheduleFunction(main, {}, timer.getTime() + 120)

If further down in the code it was decided to stop main() from running it may look like this.

 if abort == true then  
Related Functions: timer Functions: getTime, getAbsTime,getTime0, scheduleFunction, removeFunction, setFunctionTime