Closed crosslife closed 10 years ago
cpp_func
in test1.lua is nil
, line state.doFile("scripts/test1.lua");
will throw lua::RuntimeError
because of line result = cpp_func(1, 2)
in test1.lua file
you should write result = lua_func(1, 2)
instead
LuaState.h line 84, always throw error.
cpp: lua::State state; state.doFile("scripts/test1.lua");
test1.lua:
function lua_func(arg1, arg2) return arg1 + arg2 end
result = cpp_func(1, 2)
function checkLuaResult() return result == 3 end