thanks! can totally recommend a grid.
re toga:
yes, those variables are globals now. I moved the grid and arc code out of the main script to prevent a 5k loc monolith. I had a report where toga arc was throwing those same errors and I got to work if you do the following:
-- detect if arc is connected
for v in pairs(arc.devices) do
if arc.devices[v].name ~= nil then
arc_is = true
end
end
there might be a better way of arc-detection, but this worked for me so far.