LuaService Loading fixed loaded flag

This commit is contained in:
2020-08-05 09:00:29 +02:00
parent d1d9eb0cb4
commit e6ded7b903

View File

@@ -88,9 +88,9 @@ LuaService& LuaService::operator=(LuaService&& service) noexcept {
void LuaService::load() { void LuaService::load() {
if (!loaded) { if (!loaded) {
if (lua_pcall(lua, 0, 0 ,0) != 0) {
loaded = true; loaded = true;
if (lua_pcall(lua, 0, 0 ,0) != 0) {
spdlog::error("[{}] Unable to call 'lua_pcall()' in load(). [Lua: '{}']", name, lua_tostring(lua,-1)); spdlog::error("[{}] Unable to call 'lua_pcall()' in load(). [Lua: '{}']", name, lua_tostring(lua,-1));
} }
} }