Skript's error messages are written on one principle: the interpreter answers in the same language you wrote in. No codes, no stack traces — a line number, a plain-English diagnosis, and wherever possible, the fix. This chapter is a guided tour of the mistakes you will actually make, each one genuinely made and genuinely answered below.
Sentences the language does not know
The flagship error. Write a step Skript has never heard of, and it responds with its entire repertoire:
when a new lead arrives frobnicate the lead
✗ /tmp/skbook-sa0omk42/example.skript: line 2: I don't understand "frobnicate the lead". Things I know: score it with ai · assign to "Name" · reply on whatsapp "…" · send email "…" · add tag "…" · set x to value · increase x by 1 · repeat 3 times · for each x in list · while … · to <name> (define a function) · wait 10 minutes · create task "…" · log "…" · stop
Read that reply carefully — it is a complete inventory of the language's verbs, which makes this error message double as documentation. Better still, if your file defines functions, they are appended to the list under "Your functions" — so a typo in a function call gets you the menu of your own vocabulary:
when a new lead arrives welcom the lead to welcome the lead add tag "hi"
✗ /tmp/skbook-sa0omk42/example.skript: line 2: I don't understand "welcom the lead". Things I know: score it with ai · assign to "Name" · reply on whatsapp "…" · send email "…" · add tag "…" · set x to value · increase x by 1 · repeat 3 times · for each x in list · while … · to <name> (define a function) · wait 10 minutes · create task "…" · log "…" · stop Your functions: welcome the lead
The eye falls on welcom versus welcome the lead immediately. This is the unset-name rule's important exception: unknown values flow through as words, but unknown steps stop the show — a step that does nothing is never what you meant.
Structural mistakes
Indentation is structure, so structure errors are indentation errors. An empty rule is the classic:
when a new lead arrives
✗ /tmp/skbook-sa0omk42/example.skript: line 1: this "when" has an empty body — indent at least one action under it
The same guard covers empty function bodies and loops ("repeat 3 times" needs an indented body). An otherwise that has drifted away from its if gets caught too:
when a new lead arrives otherwise log "orphaned"
✗ /tmp/skbook-sa0omk42/example.skript: line 2: "otherwise" needs an "if" right above it
And a function defined twice is refused up front, because which body wins should never be a guessing game:
to greet log "hi" to greet log "hello"
✗ /tmp/skbook-sa0omk42/example.skript: line 4: "to greet" is defined twice
Value mistakes
Arithmetic on a non-number is caught at the moment of the crime, and names the culprit value:
set label to "priority" set nonsense to label * 3
✗ can't do math with "priority" — it isn't a number
Division by zero gets four honest words (can't divide by zero), and conditions that need a list (for each over a plain value) or need scoring first (score is hot before score it with ai) each explain their prerequisite — you met both earlier.
check versus run
The errors above split into two families, and the split matters for workflow. Structural mistakes — unknown sentences, empty bodies, orphaned otherwise, duplicate functions — are caught by skript check without running anything. Value mistakes — bad arithmetic, infinite loops, runaway recursion — can only surface when the program actually runs, since they depend on data.
The workflow follows directly: check constantly while writing (or let your editor do it on save — it exits 1 on failure, so it wires into anything), and run the branches before you ship. Between the two, every error in this chapter gets met on your laptop, in a terminal, with a line number — rather than in production, silently, at 2 a.m. That is the entire ambition of Skript's error design: errors should be boring. You read the sentence, you fix the line, you move on.