Error Codes
FA-SYN-001
Available since 0.1.0
The file is not valid JSON: a comma, quote or bracket is missing or extra.
| Severity | Error: the definition is not loaded |
|---|---|
| Category | syntax |
| Message | Malformed JSONC syntax: {detail}. |
| Suggestion | Fix the syntax at the reported line and column (check for trailing commas, missing quotes, commas or closing brackets). |
| Since | 0.1.0 |
Why this happened
The game could not even read the file, because its JSON is broken. The most common causes are a comma after the last item of a list or object, a missing comma between two items, a missing quote, or a bracket that is never closed. The message tells you the line and column where the reader got lost.
Wrong
A comma after the last field of an object:
{
"id": "output",
"resource_type": "foundry_apparatus:item",
"slots": 1,
"direction": "out",
}machines/iron_smelter.json:19:25 [FA-SYN-001] Malformed JSONC syntax: trailing comma before '}'.Fixed
{
"id": "output",
"resource_type": "foundry_apparatus:item",
"slots": 1,
"direction": "out"
}How to fix
- Open the file at the line and column in the message.
- Look just before that spot: the problem is usually on the previous line.
- Remove the extra comma, or add the missing comma, quote or bracket.
- Save and run
/reload(or restart, for a machine, block or item).
An editor such as VS Code underlines these mistakes in red as you type.