lua-users home
lua-l archive

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


On 12 November 2012 16:41, spir <denis.spir@gmail.com> wrote:
> I have a set of everyday tools, mainly tiny funcs one of which uses table
> pack & unpack. This func works very fine, it is exhaustively tested
> --locally. When I use it from other program files, I often get an error
> telling that Lua does not find the field (or global) 'pack' --
> _sometimes_; and all works fine, _sometimes_. If I replace pack with a
> workaround, then I get the same issue about unpack. I cannot find any logic.
>
> The same happens (works or not) whether pack & unpack are denoted on the
> table 'table' or under aliases (just the 'table.' prefix removed). I have
> checked several times that nothing in my present project files uses such
> names, or modifies table, except for adding a few 'methods' like table copy.
> Dunno. I'm highly frustrated of not getting the logic and annoyed because
> the func in question is a very practicle debugging tool I constantly use.
>
> Lua 5.2.1 on linux (lubuntu)

Any chance it's a case of accidentally using Lua 5.1 or LuaJIT in the
cases where it doesn't exist? I doubt the existence of a bug in Lua
itself where functions can go missing from tables :)

Regards,
Matthew