lua-users home
lua-l archive

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


Thank your very much! It should be what you pointed out. So this issue should close now.

Regarding LUA_CPATH issue, have any comments?

Thanks.

在2010-03-05 19:23:22,"Duncan Cross" <duncan.cross@gmail.com> 写道:
>2010/3/5 leeya <leeyacn@126.com>:
>> But, when I tried to test test.lua scripts coming from lpeg-0.9, I got
>> trouble below:
>>
>>> local m = require"lpeg"
>>> any = m.P(1)
>> stdin:1: attempt to index global 'm' (a nil value)
>> stack traceback:
>>         stdin:1: in main chunk
>>         [C]: ?
>
>The problem here is that if you define a local variable at the
>command-line prompt, it only exists for that line. Try taking out the
>word 'local' from the require statement, so it is just:
>
>>m = require "lpeg"
>
>...and it should work.
>
>-Duncan