It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
7年前关闭。
我整天都在绞尽脑汁,就是想不出来。我的服务器使用一个单一的状态,将我的所有脚本作为全局变量加载(用于调用任何时间,而不必每次运行脚本时都luaL_dofile)。当我试图使用车道时,问题就出现了。require "lanes"正常工作(我想?它返回一个表到package.loaded appropriate…),因为我在Linux(Ubuntu 11.10x86)的适当目录中有lanes.lua。然而,当我去做的时候,它告诉我。。。lanes.gen("", functionName)。在这一点上,我决定尝试attempt to index global 'lanes': a nil value,它告诉我。。。package.loaded["lanes"].gen("", functionName)如果您需要更多信息,请告诉我。提前感谢你至少是想帮忙。

最佳答案

如果使用latest LuaLanes(这是通过luarocks install lanes获得的),则加载模块的支持方式如下:

local lanes = require "lanes".configure()

configure()将创建所有必需的函数,然后调用configure()模块表为空,这似乎是您的问题。

07-28 09:07