Page 1 of 1

decoder error?

Posted: Tue Jan 12, 2021 12:14 pm
by jakoS
Has anyone encountered this problem? I'm not very good at the technical side of the editor and I got this dialogue box. Now when I try to test the backgrounds do not load and some floating npc no longer float. There are probably other problems I just haven't found them yet.
Id appreciate a little help. Thanks!:)
Image

Re: decoder error?

Posted: Wed Jan 13, 2021 3:31 am
by Hoeloe
Go to your episode folder and find a file named "progress.json". Delete that file, it's been corrupted somehow.

Re: decoder error?

Posted: Wed Jan 13, 2021 10:03 am
by jakoS
I’m sorry. That didn’t fix the problem.

Re: decoder error?

Posted: Wed Jan 13, 2021 4:43 pm
by Hoeloe
There might also be one in your "data" folder. Delete that too, if there is.

Re: decoder error?

Posted: Mon Jan 18, 2021 5:33 pm
by stillhavenogoodname
I have the same issue, except it appeared out of nowhere (the levels worked just fine before the issue appeared) and the errors keeps coming back after deleting progress.json and playing levels in my affected episode twice. SMBX2 even throws out the errors when the file only contains "{}". Other episodes are working fine, even with the same progress.json content. Is there a more permanent solution to this?

Re: decoder error?

Posted: Mon Jan 18, 2021 9:33 pm
by Hoeloe
No, simply because this error literally only occurs because of a corrupt progress.json file. That "parse error" it mentions is loading the progress.json file. From within progress.lua, all it's doing is loading that file and then trying to decode it.

Now, the real question is more "how did the file get corrupted?", and that's something I don't have an obvious answer to. You said certain episodes are causing this, but which? Does the episode utilise achievements or a custom launcher page? If so, how are those set up?

Progress.json only exists to track achievements and custom progress for the launcher. The error pictured in the screenshot is trying to parse that file. I know for a fact this does not happen with an empty progress.json, so that suggests to me that you're not looking at the right progress.json. There will be one for your episode and one in the main game itself - though that one should be empty at all times and can be safely deleted.

Re: decoder error?

Posted: Thu Jan 21, 2021 8:44 am
by stillhavenogoodname
Hoeloe wrote: No, simply because this error literally only occurs because of a corrupt progress.json file. That "parse error" it mentions is loading the progress.json file. From within progress.lua, all it's doing is loading that file and then trying to decode it.

Now, the real question is more "how did the file get corrupted?", and that's something I don't have an obvious answer to. You said certain episodes are causing this, but which? Does the episode utilise achievements or a custom launcher page? If so, how are those set up?

Progress.json only exists to track achievements and custom progress for the launcher. The error pictured in the screenshot is trying to parse that file. I know for a fact this does not happen with an empty progress.json, so that suggests to me that you're not looking at the right progress.json. There will be one for your episode and one in the main game itself - though that one should be empty at all times and can be safely deleted.
So it turns out the launcher folder in my episode's folder broke everything (I copied everything from the _templates/launcherDemo/launcher folder and haven't changed anything as I wanted to change that at a later point). Thanks for the help.

Re: decoder error?

Posted: Thu Jan 21, 2021 1:31 pm
by Hoeloe
Yep, a corrupt file in the launcher folder can produce a very similar (but not quite identical) error, which is why I brought it up as it's easy to make that mistake. Glad it's sorted out now, though!