KScript docs
EN

Error codes

KS6010

A variable set without its $, or a parameter declared with one. An error in a .kscript file, and a warning in XML. A variable has its $ everywhere: where it is declared, where it is changed and where it is read. Write $total = 3, $total += 1, $count: int = $raw and const $tax = 0.2, not total = 3 or const tax = 0.2. A parameter is a name being introduced, not a variable being read, so it is written bare: fn(n) => $n * 2, not fn($n) => $n * 2, and fn double(n) => $n * 2, not fn double($n). This holds in XML too (<do>$total += 1</do>). kscript check --fix rewrites both.