[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem with loading files
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 07 Jun 2002 17:40:36 -0300
> I also tried require:
>
> require("scheduler.lua")
>
> And got this error message:
>
> stdin:1: could not load package `scheduler.lua' from path `?.lua'
The path for "require" in Lua is different from the usual pathes.
(Should we change the name?) Instead of specifing directories (that do
not exist for Lua), it specifies very simple patterns, where a `?' is
replaced by the name of the module.
Because the standard path is `?.lua' (see the error message above),
require("scheduler.lua") will actually look for a file called
"scheduler.lua.lua". You sould change your code to require("scheduler"),
or else include a single "?" in the path; e.g.:
LUA_PATH = "?.lua;?"
-- Roberto