/snip
The documentation was wrong. I changed the syntax of the repeat command and forgot to document it properly. It should work now. Also there was a minor error in removewear which I fixed.
Thx for the fix, it works now. However the growtbug.lua script throws this error message if run from the dfhack console
..._8.6/Macnewbie/Dwarf Fortress/hack/scripts/growthbug.lua:19: attempt to index field 'units' (a nil value)
stack traceback:
..._8.6/Macnewbie/Dwarf Fortress/hack/scripts/growthbug.lua:19: in main chunk
(...tail calls...)
and this, if run in the onload.init:
..._8.6/Macnewbie/Dwarf Fortress/hack/scripts/growthbug.lua:19: attempt to index field 'units' (a nil value)
stack traceback:
..._8.6/Macnewbie/Dwarf Fortress/hack/scripts/growthbug.lua:19: in main chunk
(...tail calls...)
[C]: in function 'runCommand'
./hack/lua/dfhack.lua:384: in function 'run_command'
...bie_8.6/Macnewbie/Dwarf Fortress/hack/scripts/repeat.lua:70: in function 'func'
./hack/lua/plugins/repeatUtil.lua:27: in function 'helper'
./hack/lua/plugins/repeatUtil.lua:30: in function 'scheduleEvery'
...bie_8.6/Macnewbie/Dwarf Fortress/hack/scripts/repeat.lua:69: in main chunk
(...tail calls...)
The command is the same both times: repeat -time 1 months -command growthbug
And another question: is there any reason to be careful with the repeat commands? I'm thinking adding cleanowned, build-location, perhaps stuckdoors to be run on a 1 month interval. Should I expect slowdowns from these calculations, or is it negligible? Does dfhack run on the same core as df, or are these scripts run on a different one?