pufmat / skillsmod

A Minecraft mod that adds a fully configurable skill system to the game.
Other
36 stars 10 forks source link

Better Error Messages #48

Closed JackYevhen closed 8 months ago

JackYevhen commented 11 months ago

I am working on custom skill tree ( I am writing json by hand, because online editor is good, but doesn't work for me ( when I press E it does: absolutely nothing ) ). So, I am trying to make it actually to work, but it loads with error:

[08:15:50] [Server thread/ERROR] [puffish_skills/]: [puffish_skills] Configuration could not be loaded:
Expected `categories/magic/connections.json` to be an array.`

But my connections.json, is done fully according to requirements:

{
    "normal": {
        "bidirectional": [
            ["start", "max-mana-t1-1"],
            ["max-mana-t1-1", "max-mana-t2-1"],
            ["max-mana-t2-1", "max-mana-t3-2"],
            ["max-mana-t3-2", "max-mana-t3-3"],
            ["max-mana-t3-3", "max-mana-ultimate"],
            ["max-mana-t1-1", "max-mana-t2-2"],
            ["max-mana-t1-1", "max-mana-t3-4"],
            ["max-mana-t1-1", "max-mana-t3-5"],
            ["max-mana-t1-1", "max-mana-t3-6"],

            ["start", "cd-red-t1-1"],
            ["cd-red-t1-1", "cd-red-t2-1"],
            ["cd-red-t2-1", "cd-red-t3-2"],
            ["cd-red-t3-2", "cd-red-t3-3"],
            ["cd-red-t3-3", "cd-red-ultimate"],
            ["cd-red-t1-1", "cd-red-t2-2"],
            ["cd-red-t1-1", "cd-red-t3-4"],
            ["cd-red-t1-1", "cd-red-t3-5"],
            ["cd-red-t1-1", "cd-red-t3-6"]
        ]
    },
    "exclusive": {
        "bidirectional": [
            ["max-mana-ultimate", "cd-red-ultimate"]
        ]
    }
}

So, even tho I am maybe dumb and simply can't see the error, it would be great if it showed kind of more info about the actual error...

pufmat commented 10 months ago

This error is displayed because the version of the mod you are using is older than 0.9.0. So it doesn't support the new connections format and its features like one way connections or exclusive connections.

You should update the mod or if you don't need this features you can replace the content of connections.json by the array that you currently have at bidirectional at normal.

JackYevhen commented 10 months ago

Thanks for helping me, but It really would be better if I could found that error my self, so pleas consider making error messages more clear. (I am using 0.9.0 it self, just looked up, but I downloaded it like a couple weeks ago and It was the newest for 1.20.1)

pufmat commented 10 months ago

I think error messages are clear enough. Also, it is impossible for older versions to be aware of features added in newer versions. The only improvement I can think of is a line number where error happened.