Console overhaul, part 2. New console is mostly working.
This commit is contained in:
@@ -874,9 +874,8 @@ void World::invoke_lua_expr(int64_t actor_id, int64_t place_id, std::string_view
|
||||
LuaExtStack LS(L, func);
|
||||
|
||||
// create the compiled closure.
|
||||
int status = luaL_loadbuffer(L, datapack.data(), datapack.size(), "=invoke");
|
||||
lua_replace(L, func.index());
|
||||
if (status != LUA_OK) {
|
||||
eng::string error = LS.load(func, datapack, "=invoke");
|
||||
if (!error.empty()) {
|
||||
// The closure is actually an error message. Do nothing.
|
||||
// This should normally not happen: LuaConsole should filter
|
||||
// out syntax errors.
|
||||
|
||||
Reference in New Issue
Block a user