lua-users home
lua-l archive

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


On Sat, Dec 4, 2010 at 7:40 PM, Peyman <peiman_3009@yahoo.com> wrote:
>
> thanks steve it works, i never think about lua_isfunction(L, -1), its save my program from so many crashes.

But Mark is right - to really save your program from crashes, also use
lua_pcall, even if you know it is a function - there may be an error
and you will want to catch it.

steve d.