Hi, I'm trying to write a game in a very clean way instead of cramming multiple copies of the same code on multiple carts, most of this is solved with #include but for what I've tried, you can't do include from subfolders, what I mean is that for example, if I have a cart on a subfolder called "font" but wanna include functions from a cart located on the parent folder, something like
#include ../cart_with_functions.p8
won't work, is this even possible to do with include or am I just out of luck?
Have you actually saved the current cart yet?
I think PICO-8 doesn't know what folder the cart includes "from" until you save it.
This is because the current directory in the command prompt isn't always the same as the cart's directory.
Yeah I have, I even have 2 more carts #include'd on the cart and they work fine
What platform are you running PICO-8 on?
On Windows, #include ../file.lua or #include ../file.p8 works for me.
Are you trying to do nested #includes maybe?
[Please log in to post a comment]