When configuring your server settings, plugins or mods you will typically be editing a .yml file. YAML (Yet Another Markup Language) uses the .yml file extension and is very sensitive to syntax and formatting errors. To fix errors in .yml files, you should use a YAML Parser as they can automatically diagnose problems with your syntax.
# Using a YAML Parser
- Open an online YAML parser tool, like this one from AppSpot
- Copy and paste your YAML code into the input box
- Fix any errors the parser finds
If the output shows an error that "expected" something, then you should just the line just before the string it tells you it expects.
In this example, you can see that the parser expected something before line 8, line 8 says - '&7&o10% Chance
, so the error in your YAML will appear just before that. In this case, there were too many spaces before one of the list items.
- Repeat these steps until there are no more errors
# Common Mistakes in YAML Files
The YAML parser should explain what you need to change to fix the error, but it can be confusing. Here are a couple common mistakes that people make when configuring YAML files:
- You should be using spaces instead of tabs.
- When using "strings" (surrounded by single or double quotes) be careful that the quote isn't broken by anything inside the quote marks.