I am not, I'm on OSX. I am pretty sure this is Lua. They could have included '?/init.lua' in the definition of LUA_PATH_DEFAULT long time ago, but for some reason it isn't there.airstruck wrote: Are you running Debian? I had the impression this was something weird the Debian package maintainers did, and it didn't affect other platforms. I'm not sure it's Lua's fault; as far as I know they don't make any recommendation for what exactly should go in package.path (from LUA_PATH or luaconf.h), so it's just up to package maintainers to do something sensible.
Can't make require function work [SOLVED]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Can't make require function work
When I write def I mean function.
Re: Can't make require function work
It's right there on lines 195 and 209, isn't it?kikito wrote: I am not, I'm on OSX. I am pretty sure this is Lua. They could have included '?/init.lua' in the definition of LUA_PATH_DEFAULT long time ago, but for some reason it isn't there.
It looks like it's been there since 2013, which should mean that default setting made it into 5.3 at least. In any case, it's strange that OP reports it doesn't work in Love, since Love's default require path does include ?/init.lua (see getRequirePath and setRequirePath). In my experience ?/init.lua works fine in Love, as the wiki suggests.
Who is online
Users browsing this forum: Bing [Bot] and 5 guests