Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

Yarn Spinner Error Codes

Errors

CodeMessage
YS0001Variable has conflicting implicit type declarations. A variable is being used as different types in different places.
YS0002Type mismatch. An expression’s type doesn’t match what’s expected (e.g. assigning a number to a boolean).
YS0004Missing node delimiter. A node is missing its === closing delimiter.
YS0005Syntax error. Something in the script can’t be parsed.
YS0006Unclosed command. A << was opened but never closed with >>.
YS0007Unclosed scope. A control flow block (like <<if>>) isn’t properly closed (missing <<endif>>).
YS0011Duplicate node title. Two or more nodes have the same title without when: clauses to distinguish them.
YS0012Jump to undefined node. A <<jump>> or <<detour>> targets a node that doesn’t exist.
YS0013Invalid function call. A function is called with the wrong number or type of parameters, or doesn’t exist.
YS0014Invalid or unknown command. A command isn’t recognised. Check spelling or make sure it’s defined in your definitions file.
YS0017Line has both #line and #shadow tags. A line can’t be both — shadow lines don’t get their own line ID.
YS0018Duplicate line ID. Every #line: tag in a project must be unique.
YS0021Stray >> without a matching <<.
YS0022Command keyword outside of << and >>. Did you forget the angle brackets?
YS0025Unknown enum member. The value isn’t a known member of the expected enum type.
YS0023Wrong enum type. The value is from a different enum than what the parameter expects.
YS0024Enum type expected. The parameter expects an enum value but got something else.
YS0026Enum format error. Enum values should be written as EnumName.Value.
YS0027Invalid node name. Node titles can only contain letters, numbers, and underscores.
YS0028Can’t infer variable type. Declare the variable explicitly with <<declare>>.
YS0029Can’t determine expression type. The compiler can’t figure out what type this expression evaluates to.
YS0030Can’t modify a smart variable. Smart variables are computed values and are read-only.
YS0031Missing when: clause in node group. If some nodes in a group have when: clauses, all must have them (use when: always as a fallback).
YS0032Duplicate subtitle in node group. Subtitles within a node group must be unique.
YS0034Incompatible function. A library function has a signature that can’t be used in Yarn scripts.
YS0035Enum declaration error.
YS0036Feature requires newer project version. A language feature was used that needs a higher projectFileVersion.
YS0037Invalid literal value. A constant value couldn’t be parsed.
YS0038Unresolved type member. A type member access (like Enum.Value) couldn’t be resolved.
YS0039Variable redeclaration. A variable can only be declared once.
YS0040Type redeclaration. A type with this name already exists.
YS0041Internal compiler error. Something unexpected happened. Please file an issue.
YS0042Unknown line ID for shadow line. The #shadow: tag references a line ID that doesn’t exist.
YS0043Shadow lines can’t have expressions. Shadow lines must be plain text.
YS0044Shadow line text mismatch. A shadow line must have the same text as its source line.
YS0045Smart variable reference loop. A smart variable’s expression references itself through other smart variables.
YS0046Null default value. Variable declarations must have a non-null default value.
YS0047Expression took too long to resolve. Try simplifying this expression.

Warnings

CodeMessage
YS0003Undeclared variable. A variable is used without being declared. Add a <<declare>> statement.
YS0008Unreachable code. Code that will never be executed.
YS0015Cyclic node dependency. Nodes reference each other in a loop, which may cause infinite loops.
YS0016Unknown character. A character name isn’t defined in the project. Add it to your .yarnproject file’s characters list.

Info

CodeMessage
YS0010Unused variable. A variable is declared but never used anywhere.