lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Duh, god today is just a freaking LONG day...

Thanks Shmuel...

Mike

On Thu, Dec 16, 2010 at 3:22 PM, Shmuel Zeigerman <shmuz@013net.net> wrote:
> 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
>
>