Log In  


Tested version: 0.2.5g

When trying to save a new cart by running a cart that contains a save instruction in headless mode, and the target cart already exists,

Repro:

Create a demo cart demo.p8 with the following lua content:

save("demo_inconsistent_save1.p8")
save("demo_inconsistent_save2.p8")
save("demo_inconsistent_save3.p8")
save("demo_inconsistent_save4.p8")
save("demo_inconsistent_save5.p8")

Then run it headlessly:

pico8 -x run demo.p8

The first time, all carts will be generated. On further runs, carts already exist, but only every other cart will be properly overwritten, starting from the second one, namely: demo_inconsistent_save2.p8 and demo_inconsistent_save4.p8

Workaround: make sure to remove all existing target carts in your custom script before saving them again.

2


Thanks @huulong -- this is fixed for 0.2.6b

It was caused by the "overwrite [y/n]" interactive prompt logic happening while in headless mode.


Nice!

In the meantime I realized most of my scripts that need to save carts only care about data, for which cstore is more appropriate, and consistently overwrites data (plus when creating a new cart it won't store the __lua__ code I don't need).

But I have a script that converts .p8 to .p8.png and that one would need a true save, anyway.



[Please log in to post a comment]