Log In  

I've had two problems with saving this cart as PNG while developing it: https://www.lexaloffle.com/bbs/?tid=31179

The first problem: The cart label doesn't update once it has been saved once. I made a label, and then later wanted to change it. Pressing F7 and then saving it as PNG did not update the label. I had to manually remove the __label__ section from the raw file, and then saving a new label worked. I then tried updating that label too, which did not work. It's reproducible every time for me, at least with the aforementioned cart.

The second problem: I seem to be unable to save a cart as PNG once I have run it. If I launch PICO-8 and load the .p8 cart, I can save it as a PNG without problems. As soon as I run the cart once, though, and go back to the shell, saving as PNG no longer works – it just fails silently, with no error message but no success message either, and the PNG file is not updated.

Let me know if you need more information.

P#52081 2018-04-27 17:41 ( Edited 2018-04-28 21:42)

Do you have a function called "save()" in your source code? You may be overriding the built-in save command.

Ah, just looked at the code. That's your problem.

P#52108 2018-04-28 14:11 ( Edited 2018-04-28 18:11)

@zep

You really need to make 'save' at the command line forcibly use the built-in. Same for 'load'.

P#52109 2018-04-28 14:12 ( Edited 2018-04-28 18:12)

Haha, thanks! That is indeed the problem. I guess I didn't realize that "save" actually called "save()", since there are no parentheses. It looks like a shell command, not a Lua function.

I've actually had the same problem before when I made a function called "flip()". That one is less likely to be called from the command line, so I think it would've been more logical if it was called "_flip()" like the other built-ins. Too late to change it now I guess.

P#52113 2018-04-28 17:42 ( Edited 2018-04-28 21:45)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 19:53:51 | 0.007s | Q:20