Config file won't accept my changes
LadyCailinBot opened this issue ยท 8 comments
CRAFTBOOK-2814 - Reported by linksith
I've tried adding blocks to the "bridge" section (such as grass and dirt) but no matter what I do it will say that my config file is corrupt and will turn off craftbook. I've tried using item numbers and tried using variables like "- OBSIDIAN" just to see if I could get ANYTHING added; but nothing worked. I tried going to the wiki but it was less than helpful. How do I add blocks to bridges?
Comment by linksith
Ok I think I understand what you are saying. because of that, I had an idea to turn on the proofreading function in Notepad++.
Every time I tried to start a new line in N++ it had two recognized characters. CR and LF. All the other lines had LF but I for some reason couldn't start a new line without having CR. I don't know why. So I tried just plain notepad and it didn't have lines (i don't know why) but I added another segment with it and for some reason it worked.
I don't mean to be an annoyance or bother but why won't it work in N++? N++ always works with other config files.
Comment by me4502
It works fine for me with N++, it must be something you are doing.
CraftBook uses the same YAML parsing as every other plugin, so it can't be something localized to just CraftBook.
Comment by linksith
Hmmm. Must be. Well, Thanks for your help :)
NOTE: this can be marked as fixed now
Comment by me4502
If it says your config is corrupt, you've broken the YAML of the config. Make sure you aren't using tabs, and run the config through an online YAML parser before saving it.
Comment by linksith
When I add this section of code....
"
bridge:
enable: true
allow-redstone: true
max-length: 30
max-width: 5
blocks: 1,2
- COBBLESTONE
- WOOD
- GLASS
- DOUBLE_STEP
- WOOD_DOUBLE_STEP
"
The online parser returns this...
"
ERROR:
while parsing a block mapping
in "", line 2, column 9:
enable: true
^
expected , but found '-'
in "", line 7, column 9:
- COBBLESTONE
^
"
and even when I don't modify it, it will still complain about the "enable: true" line. FYI I'm using notepad++ to modify my config file
Comment by me4502
That section of the config is severely messed up by bad indentation and the usage of tabs, plus there are bits that shouldn't be there. Firstly fix the indentation of the COBBLESTONE line, and remove the 1,2 after blocks:
Then re-indent the enable:true of the bridge.
Comment by linksith
Ok
- I just coppied and pasted that info and the indentation doesnt look like that in my file. but I see what you are saying. I'll fix that.
- Remove 1,2? then how do I ADD blocks 1 and 2 to the list of blocks to be used with the bridge?
Comment by me4502
Never copy paste multiple lines into a YAML file. Only copy 1 line at a time, and only copy the text, not the white spaces before and after.
I said to remove the 1,2, because you have each on a separate line, and you can't have stuff on separate lines if you have other stuff on the same line. You can readd stone and grass along with the others.
- STONE
- GRASS