aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-11-21 14:59:39 +0100
committerorwell96 <orwell@bleipb.de>2019-11-21 16:02:32 +0100
commit576365627a6ed8ba3fede9de1dce675a94747e48 (patch)
treeb8688c875cbec8c133066d8ca5d2800a2a919819 /advtrains_luaautomation
parent8c55442076c9d5cfed89bac3f4acd22ea7948dd3 (diff)
downloadadvtrains-576365627a6ed8ba3fede9de1dce675a94747e48.tar.gz
advtrains-576365627a6ed8ba3fede9de1dce675a94747e48.tar.bz2
advtrains-576365627a6ed8ba3fede9de1dce675a94747e48.zip
Fix scheduler crash (H#133)
for loops don't work with manipulating i
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r--advtrains_luaautomation/active_common.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua
index 3dc018d..c17c6e9 100644
--- a/advtrains_luaautomation/active_common.lua
+++ b/advtrains_luaautomation/active_common.lua
@@ -131,10 +131,10 @@ function ac.run_in_env(pos, evtdata, customfct_p)
-- add lines scheduler if enabled
if advtrains.lines and advtrains.lines.sched then
customfct.schedule = function(rwtime, msg)
- advtrains.lines.sched.enqueue(rwtime, "atlatc_env", {pos=pos, msg=msg}, advtrains.encode_pos(pos), 1)
+ return advtrains.lines.sched.enqueue(rwtime, "atlatc_env", {pos=pos, msg=msg}, advtrains.encode_pos(pos), 1)
end
customfct.schedule_in = function(rwtime, msg)
- advtrains.lines.sched.enqueue_in(rwtime, "atlatc_env", {pos=pos, msg=msg}, advtrains.encode_pos(pos), 1)
+ return advtrains.lines.sched.enqueue_in(rwtime, "atlatc_env", {pos=pos, msg=msg}, advtrains.encode_pos(pos), 1)
end
end