weedIDs = group(95109)
this line gives me an error “Lua failure”. Logs:
{:lua_error, {:illegal_index, {:erl_func, #Function<3.62652274/2 in :luerl.encode/2>}, “id”}, {:luerl, {:tstruct, %{122 => {:table, {:array, 0, 10, nil, 10}, :em
My plan is to have multiple groups with the same name to execute code on each of them:
groupname = variable("Groupname")
groups = api({
method = "GET",
url = "/api/point_groups/"
})
weeds = {}
for _, group in pairs(groups) do
if group.name == groupname then
plantIDs = group(group)
for _, p in pairs(plantIDs) do
local plant = api({
method = "GET",
url = "/api/points/" .. p
})
local x = plant.x
local y = plant.y
local z = soil_height(x, y)
local radius = plant.radius
table.insert(weeds, {x = x, y = y, z = z, radius = radius})
end
end
end