FATAL_ERROR("");
lua_remove(L, -2); // Remove registered_abms
+ scriptIface->setOriginFromTable(-1);
+
// Call action
luaL_checktype(L, -1, LUA_TTABLE);
lua_getfield(L, -1, "action");
lua_pushnumber(L, active_object_count);
lua_pushnumber(L, active_object_count_wider);
- PCALL_RESL(L, lua_pcall(L, 4, 0, errorhandler));
+ int result = lua_pcall(L, 4, 0, errorhandler);
+ if (result)
+ scriptIface->scriptError(result, "LuaABM::trigger");
lua_pop(L, 1); // Pop error handler
}