[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Simple pattern matching...
- From: Mike McGonagle <mjmogo@...>
- Date: Thu, 16 Dec 2010 15:26:25 -0500
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
>
>