lua-users home
lua-l archive

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


Thanks; I need to do this from within C, though.

I'm now using my own function:

void my_dostring(lua_State *L, const char *cmd)
{
    int status = luaL_loadbuffer(L, cmd, strlen(cmd), cmd);

    if (status == 0)
        status = lua_pcall(L, 0, LUA_MULTRET, 0);

    if (status != 0)
    {
        lua_getglobal(L, "_ALERT");
        lua_insert(L, -2);
        lua_call(L, 1, 0);
    }
}


This seems to work as expected.

Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software