aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-05-22 15:01:38 +0200
committerorwell96 <mono96.mml@gmail.com>2017-05-22 15:01:38 +0200
commitd85f95ad10ac89792d940ba6e8dc1c341ff2757a (patch)
tree4ed8dee2838c8df63d8b8a6824aaf54ad764df97 /advtrains/advtrains_luaautomation/atc_rail.lua
parent5fe0ba1f2472263588a15a3366b5aee2ef7f61a9 (diff)
downloadadvtrains-d85f95ad10ac89792d940ba6e8dc1c341ff2757a.tar.gz
advtrains-d85f95ad10ac89792d940ba6e8dc1c341ff2757a.tar.bz2
advtrains-d85f95ad10ac89792d940ba6e8dc1c341ff2757a.zip
Fix issue #40
Was caused by arrowconn not being set. Instructs user to revisit.
Diffstat (limited to 'advtrains/advtrains_luaautomation/atc_rail.lua')
-rw-r--r--advtrains/advtrains_luaautomation/atc_rail.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/advtrains_luaautomation/atc_rail.lua b/advtrains/advtrains_luaautomation/atc_rail.lua
index ab84986..3ec82c8 100644
--- a/advtrains/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains/advtrains_luaautomation/atc_rail.lua
@@ -17,6 +17,10 @@ function r.fire_event(pos, evtdata)
local arrowconn = railtbl.arrowconn
+ if not arrowconn then
+ atwarn("LuaAutomation ATC interface rail at",ph,": Incomplete Data! Please visit position and click 'Save'!")
+ return
+ end
--prepare ingame API for ATC. Regenerate each time since pos needs to be known
--If no train, then return false.