Thanks for the quick update. I'm still running Factorio 2.0, so I don't have 'get_item_position'. I made the following backward compatibility edit in control.lua around line 161.
[code]
-- LuaTransportLine.get_item_position only exists in Factorio 2.1+. On 2.0,
-- merely indexing the missing key raises an error, so probe it with pcall.
local ok,pos=pcall(function()return line.get_item_position(#line)end)
if ok and type(pos)=='number' then
last=pos
else
...
[/code]
I also had to work around some proxy validity errors. Around line 112 I added the following:
[code]
-- A stale (invalid) reference is not nil, so it used to slip past the
-- "if not proxy" creation below and crash on first use. Drop it so it is rebuilt.
if proxy and not proxy.valid then r.proxy=nil;proxy=nil;r.dirty=true end
[/code]
Before (old) line 129 I added:
``` if not proxy.valid then r.proxy=nil;r.dirty=true;return end
And I wrapped the proxy.disabled_by_script = true statement on line 130 with this check:
``` if proxy.valid then proxy.disabled_by_script=true else r.proxy=nil;r.dirty=true end
(sorry, I obviously don't know how to format code for this forum)