[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: require vs dofile (lua 5.1.4 windows)
- From: HyperHacker <hyperhacker@...>
- Date: Thu, 24 Jun 2010 00:21:33 -0600
On Thu, Jun 24, 2010 at 00:13, mos <email@example.com> wrote:
> there are 2 files in 2 fold like:
> the b.lua use
> require "..\\a\\a.lua"
> will get a error can not find a.lua
> but use
> will ok
> I don't konw why.
> Best Regard
require() looks in the paths in package.path and package.cpath, while
dofile() looks in the current working directory. See
Sent from my toaster.