开发者

LuaJIT require module error

require "utils.lua"
stdin:1: module 'utils.lua' not found:
        no field package.preload['utils.lua']
        no file 'D:\blizzard\Projects\Lu开发者_开发知识库a'
        no file '.\utils\lua.dll'
        no file 'D:\blizzard\Projects\Lua\utils\lua.dll'
        no file 'D:\blizzard\Projects\Lua\loadall.dll'
        no file '.\utils.dll'
        no file 'D:\blizzard\Projects\Lua\utils.dll'
        no file 'D:\blizzard\Projects\Lua\loadall.dll'

Why LuaJIT searches for .dll instead of .lua and how to fix this behavior?


You should require utils (ditch the .lua) , and utils.lua should be on your package.path variable, or passed as the LUA_PATH environment variable.

More info in the Lua Reference Manual about package.loaders, require() and package.path

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜