script.on_nth_tick crashes with nil; also documentation
Posted: Sun May 13, 2018 5:15 pm
script.on_nth_tick(nil, nil) crashes, but the documentation says:
Furthermore, the documentation doesn't make clear that the specified event fires on every tick that is a multiple of n, instead of only on the nth tick; I had assumed the latter. I suggest something like "Register a handler to run on every tick that is a multiple of n.". It is also unclear whether, if you pass the array {2, 3} say, the handler is run once or twice on tick 6.Parameters
tick :: uint or array of uint: The nth-tick(s) to invoke the handler on. Passing nil will unregister all nth-tick handlers.
f :: function(NthTickEvent): The handler to run. Passing nil will unregister the handler for the provided ticks.