lua-users home
lua-l archive

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

On Wed, Dec 10, 2014 at 8:52 AM, Santosh Kadam <> wrote:
> What I have observed is that if I don't call openlibs - I don't get the
> value returned to the LUA function. From the debug logs (lua asserts)  - I
> can see that an error is printed like this "An attempt to print (nil)
> value."

is that the exact error message?  i think it should be "attempt to
call global 'print' (a nil value)", which means that 'print' isn't
defined, as should be expected if you haven't loaded the standard
library by skipping luaL_openlibs(L)

in short: no, it's not mandatory to call luaL_openlibs; but if you
don't then you don't get any default function, like print()