04.11.2019, 14:26
Of course a Boolean is not a number. For binary use such script.
Code:
function tag_sum(tag)
local objects, result
result = 0
objects = grp.tag(tag)
for _, object in ipairs(objects) do
if object.data then
result = result + 1
end
end
return result
end
sum=tag_sum('Supply'))
grp.checkwrite('1/1/1', sum)
------------------------------
Ctrl+F5
Ctrl+F5