From 197e7dd8b1919f464b4671b7d33b6fd605ecb77c Mon Sep 17 00:00:00 2001 From: Rodrigo Delduca Date: Wed, 19 Feb 2025 13:41:04 -0300 Subject: [PATCH] Work in progress --- src/scriptengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scriptengine.cpp b/src/scriptengine.cpp index 9bafe68..48e156a 100644 --- a/src/scriptengine.cpp +++ b/src/scriptengine.cpp @@ -554,8 +554,9 @@ void framework::scriptengine::run() { lua.script(std::string_view(reinterpret_cast(script.data()), script.size())); lua["setup"](); - const auto loop = lua["loop"].get(); const auto engine = lua["engine"].get>(); + const auto loop = lua["loop"].get(); engine->add_loopable(std::make_shared(lua, std::move(loop))); + lua["run"](); }