[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua C program return value...
- From: Santosh Kadam <sanmanik@...>
- Date: Sat, 13 Dec 2014 23:40:49 +0530
Thank You Javier, Your tips helped me overcome my error.
SantoshMessage: 2Date: Wed, 10 Dec 2014 08:57:51 -0500From: Javier Guerra Giraldez <firstname.lastname@example.org>Subject: Re: Lua C program return value...To: Lua mailing list <email@example.com>Message-ID: <CAFkDaoQpKgpvaftL4u2sHkoKdRf9pFZbFvtsD0FOOdnTPw2yXg@mail.gmail.com
" style="font-size:13px">CAFkDaoQpKgpvaftL4u2sHkoKdRf9pFZbFvtsD0FOOdnTPw2yXg@mail.gmail.com>Content-Type: text/plain; charset=UTF-8On Wed, Dec 10, 2014 at 8:52 AM, Santosh Kadam <firstname.lastname@example.org> 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 tocall global 'print' (a nil value)", which means that 'print' isn'tdefined, as should be expected if you haven't loaded the standardlibrary by skipping luaL_openlibs(L)in short: no, it's not mandatory to call luaL_openlibs; but if youdon't then you don't get any default function, like print()--Javier