Hello,
i want this dir structur:
* code
** main.lua
* content
** maps
*** map1.lua
and it seems i cant require "../content/maps/map1"
any way around, i really dont want to put all content into code dir.
thanks!
require parent dir - sandboxing...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: require parent dir - sandboxing...
Main.lua has to be in the root directory. You can do this:
Code: Select all
main.lua
* code
** other.lua
* content
** maps
*** map1.lua
Kurosuke needs beta testers
Re: require parent dir - sandboxing...
yes, thanks
a fake main with only
require "code/main"
do the trick
a fake main with only
require "code/main"
do the trick
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: require parent dir - sandboxing...
Change it to require("folder.file") without an extension and with a period instead of slash because 0.8.0 will no longer recognize either.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 7 guests