|
Mike McGonagle wrote:
for line in io.lines(filename) do name, register, sliders = line:match("([%S]*)[%s]*([%S]*)[%s]*([%S]*)") print(string.format("name = '%s' register = '%s' sliders = '%s'", name, register, slider)) end
[...]
But I get the error of "bad argument #4 to 'format' (string expected, got no value)", and the variable 'slider' is 'nil'.
This is because of a spelling error in the arg. #4: must be "sliders". -- Shmuel