diff options
Diffstat (limited to 'advtrains_line_automation/stoprail.lua')
-rw-r--r-- | advtrains_line_automation/stoprail.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/advtrains_line_automation/stoprail.lua b/advtrains_line_automation/stoprail.lua index ec4994b..0db474f 100644 --- a/advtrains_line_automation/stoprail.lua +++ b/advtrains_line_automation/stoprail.lua @@ -4,7 +4,10 @@ local function to_int(n) --- Disallow floating-point numbers - return math.floor(tonumber(n)) + local k = tonumber(n) + if k then + return math.floor(k) + end end local function updatemeta(pos) |