> ## Documentation Index
> Fetch the complete documentation index at: https://chart-spec.enchor.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Nonstandard files

> What scan-chart reads in a .chart file that doesn't follow the standard, and how it saves it.

The [syntax](/chart/syntax) page gives the standard. A file that breaks it is invalid, and other scanners may refuse it. scan-chart reads such a file more widely: where a line or section has one probable meaning, scan-chart reads that meaning and reports an issue. When you save an edited song, scan-chart writes what it read in the standard form.

## Lines read as they probably mean

| Written | Read and saved as |
| - | - |
| `14592 N 5 0`, without `=` | `14592 = N 5 0` |
| `0=N 1 0` or `0 =  N  1 0`, or with tabs | `0 = N 1 0` |
| `0 = N 3 1103.99`, with a decimal | `0 = N 3 1104`, the nearest whole number |
| `0 = N 1`, without a length | `0 = N 1 0` |
| `11520 = E  [idle`, with more than one space before the text | `11520 = E [idle` |
| `0 = E section Intro` in `[Events]`, without quotation marks | `0 = E "section Intro"` |
| A carriage return before a text's closing quotation mark | The text without it |
| `96 = E "lyric Saa`, then a line holding only `"` | `96 = E "lyric Saa"` |
| `Genre = "Rock`, then a line holding only `"`, in `[Song]` | `Genre = "Rock"` |
| `Resolution=480`, a number in `[Song]` with other spacing | `Resolution = 480` |

The `nonstandardChartLine` issue names the first such line in each section.

## Sections

* **No resolution:** a file with no `[Song]` section, or no `Resolution` in it, is read with a resolution of 192, as every scanner reads it. Saving adds `Resolution = 192`, and the `[Song]` section when there's none.
* **Order:** `[Song]` and `[SyncTrack]` are read wherever they are. Saving puts them first, in that order.
* **A repeated name:** the first section with the name is read. Saving removes the others.

The `nonstandardChartSections` issue says which of these a file has.

## Repeated markers

Two tempo markers, or two time signatures, at one tick in `[SyncTrack]` are read as games read them: the later one counts. Saving removes the earlier one.

## Lines read as written

These forms don't mean to games what they probably meant to the charter. scan-chart reads them as games do, and saving leaves them as written, for you to fix:

* **A decimal comma,** such as `Offset = 0,1`, is read as no value.
* **A `Resolution` that isn't a whole number,** such as `Resolution = 480.5`, is read by its leading digits, as 480.
* **An `[Events]` text with no closing quotation mark,** such as `1 = E "phrase_start`, isn't read. A lyric is the exception: `E "lyric Saa` is read as the lyric `Saa`, as YARG reads it. Clone Hero reads every such text as an empty event, a lyric included.

The `nonstandardChartLine` issue names them too.

## Lines that can't be read

A line with no probable meaning is ignored, and saving an edited song removes it:

* two ticks, such as `73344  85632 = E "section Bridge"`;
* a negative number, such as `52952 = S 2 -1649`;
* more values than the event takes, such as `0 = N 1 0 0`;
* text before a section's `}` on its line, such as what's left of a cut-off `419040}`;
* a `[Song]` number that isn't a number, such as `PreviewStart = soon`, and a `[Song]` line without `=`.

The `unreadableChartLine` issue names the first in each section, so you can fix it before saving.

## Saving

Saving an edited song never changes a TrackHash or the SongHash your edits didn't. These rewrites can't: the hashes come from what scan-chart reads, and the rewrites write exactly that. So saving always applies them, in every section.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.