Function; Rule_Remove
Novaras edited this page Aug 14, 2023
·
4 revisions
Removes a registered named function previously added via Rule_AddInterval
.
Param | Type | Description |
---|---|---|
function_name |
string |
The name of a function. Casing DOES matter. |
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`
| Home | Search | Recent Changes | Revision History | About | User Help | Contributor Help | Discussion |