lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Found the problem :).  Actually I was calling luaL_openlibs followed by
luaopen_package witch seems to erase package.loaders.  Removing the
luaopen_package fixed it so now everything is working properly :).

 - Jeremy

"Help I suffer from the oxymoron Corporate Security."


> -------- Original Message --------
> Subject: Re: 'package.loaders' must be a table???
> From: Diego Nehab <diego@tecgraf.puc-rio.br>
> Date: Thu, September 14, 2006 12:07 pm
> To: Lua list <lua@bazar2.conectiva.com.br>
> 
> Hi,
> 
> > I started upgrading my engine to Lua 5.1.  No major problems until I
> > tried a require inside of one of my scripts.  Now I get the error
> > "'package.loaders' must be a table" when I try and use require.  I hit
> > the book, but only found reference to package.loaded, package.preload,
> > and package.path.  Can someone tell me what I've done wrong to break
> > the require function?
> 
> Hmmm. I don't know, but are you still using Compat-5.1, by
> accident?
> 
> Regards,
> Diego.