Script Function Reference

Function Reference >Script Function Reference >Table Formats>list

List

The list format is a table representing a list.
x.type = "list"
x.len -- represents the length of the list
x[1:len] -- the elements in the list, each element is a number format
Here is an example using the list format.
function average(list)
  sum = 0
  for i = 1,list.len do
    sum = sum + list[i].r
  end
  return sum / list.len
end