potential bug fixed

This commit is contained in:
Joachim Stolberg 2017-11-01 16:42:07 +01:00
parent 9b9aa43582
commit c48edda1f0

View File

@ -143,6 +143,7 @@ local function on_receive_fields(pos, formname, fields, player)
elseif fields.button ~= nil then
local key_str = meta:get_string("key_str")
local idx = tonumber(fields.button)
if key_str and idx then
local tDest = get_station_list(key_str)[idx]
if tDest ~= nil then
-- place booking if not already blocked
@ -156,6 +157,7 @@ local function on_receive_fields(pos, formname, fields, player)
hyperloop.data.change_counter = hyperloop.data.change_counter + 1
end
end
end
end
local function on_destruct(pos)