# P022

> unknown string escape

**Severity** Error

Inside a string a backslash starts an escape sequence. Only `\n` (new line), `\t` (tab), `\"` (double quote) and `\\` (backslash) are recognised; any other letter after a backslash is reported.

If you wanted a literal backslash, double it. Usually it is simpler to rephrase, for example with a slash.

## Failing example

```flowscope
script "Liquidation split"
data (
  chart = subscribe(data.ohlcv)
  liq = subscribe(data.liquidations)
)
plot ratio = plot.line(title: "Longs\Shorts")
on chart.close {
  let s = liq.shorts ?? 0.0
  ratio.plot(s > 0.0 ? (liq.longs ?? 0.0) / s : null)
}
```

## Fixed example

```flowscope
script "Liquidation split"
data (
  chart = subscribe(data.ohlcv)
  liq = subscribe(data.liquidations)
)
plot ratio = plot.line(title: "Longs / Shorts")
on chart.close {
  let s = liq.shorts ?? 0.0
  ratio.plot(s > 0.0 ? (liq.longs ?? 0.0) / s : null)
}
```

## Related

- [P002](/docs/scripting/reference/diagnostics/p002)
