24.11.2020, 10:33
dot is a special symbol that is treated as "any character" by the gsub. You need to escape it like this:
Since you are using comma as a decimal separator you should use ; instead of comma as csv field separator.
Code:
value = string.gsub(tostring(obj.value), "%.", ",")
csv[ #csv + 1 ] = obj.name .. ';' .. value