Function; Rule_Remove - HWRM/KarosGraveyard GitHub Wiki

Rule_Remove(<function_name>)

Description

Removes a registered named function previously added via Rule_AddInterval.

Arguments

Param Type Description
function_name string The name of a function. Casing DOES matter.

Example

function updateTimer()
 -- your code here...
end

print("rule exists?: " .. tostring(Rule_Exists("updateTimer")); -- should be 0 before the call to `Rule_AddInterval`
Rule_AddInterval("updateTimer", 1); -- calls our 'updateTimer' function every 1s:
print("rule exists?: " .. tostring(Rule_Exists("updateTimer")); -- should be 1 after the call to `Rule_AddInterval` & before the call to "Rule_Remove`
Rule_Remove("updateTimer");
print("rule exists?: " .. tostring(Rule_Exists("updateTimer")); -- should be 0 after the call to `Rule_Remove`

Related Pages