Log In  


Cart #dojoyuduwi-0 | 2022-10-03 | Code ▽ | Embed ▽ | No License

This is another problem I run into, @zep.
Examine the code. It's empty, right ?

But no, if you load it up and check info() you will see that it takes 736-characters in space.

So what is going on here ?

Clearly Pico-8 is not truncating spaces. And how many times have you run into this ?

  variable=value

A line in your code and you go up to change it when you realize you have 2- or more spaces are at the end of the line. Naturally you backspace over them, but this can be tedious if you have done this in other parts of your code - and it DOES count against your 65535-character total.

May I suggest future Pico-8 automatically truncate empty spaces on the end of code when loaded, when saved, when edited, when typed, and when the cursor matches its vertical position. Also check and truncate prior to the programmer pressing the ENTER key for a new line.


I have since written a tool to fix this problem, although it is a tool and should additional spaces be removed in code in future Pico-8, it will no longer be needed:

https://www.lexaloffle.com/bbs/?tid=49614




[Please log in to post a comment]