This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

While Loop for reading values
#4
Code:
function tag_max(tag)
  local objects = grp.tag(tag)
  local result = -math.huge

  for _, object in ipairs(objects) do
    result = math.max(result, object.value)
  end

  return result
end

max = tag_max('my_tag_name')
log(max)
Reply


Messages In This Thread
While Loop for reading values - by tomnord - 06.01.2021, 09:10
RE: While Loop for reading values - by admin - 06.01.2021, 13:12
While Loop for reading values - by tomnord - 06.01.2021, 13:27
RE: While Loop for reading values - by admin - 06.01.2021, 13:33
RE: While Loop for reading values - by Daniel - 19.01.2021, 13:07
RE: While Loop for reading values - by admin - 19.01.2021, 13:30
RE: While Loop for reading values - by admin - 19.01.2021, 14:43

Forum Jump: