Log In  


My game (which uses includes) runs perfectly from within the Pico 8 environment. It also runs perfectly when I export it without using includes (that is, when I pre-merge all the files together and then export).

But when I export it with includes (either to a standalone .bin or to an html page) I get the following error when I try to run the exported version:

could not #include file:

stopped. press button to exit

init_functions.p8 is one of the files I'm including from the main file.

Here is the code from the main program:

pico-8 cartridge // http://www.pico-8.com
version 18

#include init_functions.p8
#include main_controllers.p8
#include start_functions.p8

#include game_functions.p8
#include ugene_functions.p8
#include actor_functions.p8
#include ui_functions.p8
#include common_functions.p8
#include gameover_functions.p8

(and all the graphics data is here)

and here is the first few lines from the first include, which I'm showing here in case it has something to do with the header portion?

pico-8 cartridge // http://www.pico-8.com
version 18

function _init()



Am I doing something wrong? Again I want to emphasize that everything works perfectly when running this from within Pico 8, just not when I export it.

I've searched for an answer to why this might be happening, to no avail.

Thanks for any light anyone could shine on this!


P#68157 2019-09-26 18:48 ( Edited 2019-09-29 22:13)


Hi! I believe you are referring to this bug:


It is a known bug and will be fixed in the next version:


Until then, there is a very easy workaround: save a copy of your cart as a .p8.png first, which does correctly flatten the #includes. Then export that version.

P#68167 2019-09-26 22:34 ( Edited 2019-09-26 22:35)

Thank you kittenm4ster!

P#68170 2019-09-26 23:09

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-12-04 22:44 | 0.010s | 4194k | Q:16