lua-users home
lua-l archive

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


Hi,
what I do to load a file is this:

    if(luaL_loadfile(l, name) || lua_pcall(l, 0, 0, 0))
        return error((char *) lua_tostring(l, -1));
    else
        return 1;

error() is just a macro that prints a formatted string and returns 0.I
assume similar things can be done for strings etc.

Dimitris