Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show error message in game chat when json is invalid #108

Open
Gears-Cringemonger opened this issue Dec 12, 2024 · 2 comments
Open

Show error message in game chat when json is invalid #108

Gears-Cringemonger opened this issue Dec 12, 2024 · 2 comments

Comments

@Gears-Cringemonger
Copy link

Describe the feature/addition!

Show an error message in the ingame chat upon reload if the new json file is invalid, and also mention where the invalid file was moved to, an example here:
[file].json found to be invalid, changes have been reverted and moved to [file].json.bak

Why would like to see this feature/addition?

It took me a good half hour of troubleshooting my unify.json before I looked in 1.20-support to see if anyone had dealt with .bak before. I'm sure there are some less patient than me who would have given up solving it earlier, so having it show when you did something wrong would be greatly appreciated.

Besides that one issue I'm in love with this mod, keep it up.

@rlnt
Copy link
Member

rlnt commented Dec 12, 2024

It's written in the log. Logs should always be the first thing to check if you run into issues. We even added a standalone log for all Almost Unified related log messages to make this easier to see.
The .bak files are just a way to prevent config loss. The data in the config that couldn't be read is copied to the .bak file and a default config is generated so the mod can work again. You can then use the .bak file to see your old config instead of losing all your changes because there was an issue.

However, we could make this more visible, I agree. A chat message after the reload might not be a bad idea.

@Gears-Cringemonger
Copy link
Author

Ah, the logs. I'll admit this is the first time I've done anything even remotely close to modpack work, so I really don't know most of the ins and outs of this type of stuff. Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants