From 9da148347d304ec2f26af6f813e26cb02bc6a6e7 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 24 Jan 2019 17:50:26 +0100 Subject: Basic functions of "stop rail", missing ARS rules and signal. For signal, need to think of a callback system for signals and moving atlatc queue to core? --- advtrains/helpers.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'advtrains/helpers.lua') diff --git a/advtrains/helpers.lua b/advtrains/helpers.lua index 511d32e..3514f55 100644 --- a/advtrains/helpers.lua +++ b/advtrains/helpers.lua @@ -381,6 +381,7 @@ end -- decodes a position encoded with encode_pos function advtrains.decode_pos(pts) + if not pts or not #pts==6 then return nil end local stry = string.sub(pts, 1,4) local strx = string.sub(pts, 5,8) local strz = string.sub(pts, 9,12) -- cgit v1.2.3