初始化函数添加自定义模块调用示例

This commit is contained in:
xx
2024-06-01 19:21:49 +08:00
parent a090307768
commit bcdfe28b54
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
print("init fast web success!")
-- 自定义模块演示
local hello = hello.new()
print("Custom Module: "..hello:name())
return true

View File

@@ -130,7 +130,7 @@ void module_manager::load_core(sol::state* lua)
void module_manager::load_3rdparty(sol::state* lua)
{
for_iter(iter, m_modules)
{
{
if (iter->second.func(lua, lua->lua_state()) != 0)
{
LOG_ERROR("egist module failed, filename: "+iter->first);