Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to add "require" to the lua script #138

Open
dzzzc opened this issue Jun 15, 2021 · 0 comments
Open

failed to add "require" to the lua script #138

dzzzc opened this issue Jun 15, 2021 · 0 comments

Comments

@dzzzc
Copy link

dzzzc commented Jun 15, 2021

for example, I add “require("hello2-1")” to the “hello2-3.lua” ,failed to execute "luerl:do" , but only add "require("math")" success

lua:

require("math")
require("hello2-1")

function no() print("(16) No!") end

print(math.abs(-15))
print("(15) Maybe ...")

return "(X) Yes!"

erl:

>os:putenv("LUA_LOAD_PATH","C:/Users/admin/Desktop/luerl-0.4/examples/hello"). 
>{ok,Function,FullName,State}=luerl:path_loadfile("hello2-3.lua",luerl:init()).
>luerl:do(Function,State). 

fail info:

exception error: {lua_error,
                     {no_module,<<"hello2-1">>,
                      <<"'./hello2-1.lua' './hello2-1/init.lua' ">>},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant