LuaService Loading fixed loaded flag
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user