All InScript error codes with examples and fixes.
".let s = "hello // ❌ missing closing quote let s = "hello" // ✅
{, extra keyword, wrong operator.) or }) but found something else.fn f(x { return x } // ❌ missing )
fn f(x) { return x } // ✅{} [] (). Count your opening and closing brackets.print(x) // ❌ x not defined yet let x = 5 print(x) // ✅
let x: int = "hello" // ❌ string ≠ int let x: int = 42 // ✅
let x = 5 + "hello" // ❌ int + string let x = 5 + 10 // ✅
let a = [1,2,3] print(a[5]) // ❌ index 5 out of range (len=3) print(a[2]) // ✅ last element = 3
.modules in REPL to see all 59 available modules.float division if you want Infinity: 1.0 / 0.0 = Infinity.case _ { } as a wildcard.nil. Use ?. optional chaining or check with x != nil.assert(cond, msg) failed. The catch variable receives the message string directly.panic(msg) called. Use for truly unrecoverable states.unreachable(msg) reached. This is a programmer error — the code path was supposed to be impossible.