Aego Русский

Diagnostics

Every code the compiler, the script runtime and the engine report, with what it means and how to fix it.

On this page

Lexer

AES1001error

This character cannot appear here.

Broken

package demo

func Both(a bool, b bool) bool {
	return a & b
}
demo/main.aes:4:11: AES1001 operator "&" is not supported, Aego Script has no bitwise operators

Fix: Use ASCII letters for names, put other text inside a string, and use && or || instead of & or |.

Fixed

package demo

func Both(a bool, b bool) bool {
	return a && b
}

AES1002error

The string literal has no closing quote.

Broken

package demo

const Greeting = "hello
demo/main.aes:3:18: AES1002 string literal is not terminated

Fix: Add " at the end of the string.

Fixed

package demo

const Greeting = "hello"

AES1003error

The escape sequence after \ is not supported.

Broken

package demo

const Folder = "saves\data"
demo/main.aes:3:22: AES1003 unknown escape sequence \d

Fix: Use \n, \t, \", \\ or \uXXXX.

Fixed

package demo

const Folder = "saves\\data"

AES1004error

The word is reserved for a future version of the language.

Broken

package demo

func Pick(n int) int {
	select := n * 2
	return select
}
demo/main.aes:4:2: AES1004 "select" is reserved for a future version of Aego Script

Fix: Rename the identifier.

Fixed

package demo

func Pick(n int) int {
	choice := n * 2
	return choice
}

AES1005error

The number literal is malformed.

Broken

package demo

const Speed = 2.
demo/main.aes:3:15: AES1005 float literal needs digits after the point, write 1.0

Fix: Write digits after the point (1.0, not 1.) and separate digits with _ only between digits.

Fixed

package demo

const Speed = 2.0

AES1006error

The block comment has no closing */.

Broken

package demo

/* TODO: tune the speed
const Speed = 2.0
demo/main.aes:3:1: AES1006 block comment is not terminated

Fix: Add */ where the comment should end.

Fixed

package demo

/* TODO: tune the speed */
const Speed = 2.0

AES1007error

The file contains bytes that are not valid UTF-8.

Broken

package demo

const Name = "Caf�"
demo/main.aes:3:18: AES1007 invalid UTF-8 encoding in string literal

Fix: Save the file as UTF-8.

Fixed

package demo

const Name = "Café"

AES1008error

A string literal cannot span lines.

Broken

package demo

const Hint = "Press Space
to jump"
demo/main.aes:3:14: AES1008 newline in string literal

Fix: Close the string on the same line or use \n.

Fixed

package demo

const Hint = "Press Space\nto jump"

Parser

AES1101error

The parser expected something else at this point.

Broken

package demo

func Area(w float, h float) float {
	return (w * h
}
demo/main.aes:4:15: AES1101 expected ')', found newline

Fix: Check for a missing bracket, comma or operator right before this position.

Fixed

package demo

func Area(w float, h float) float {
	return (w * h)
}

AES1102error

Every script file starts with a package clause.

Broken

func Twice(n int) int {
	return n * 2
}
demo/main.aes:1:1: AES1102 file must start with a package clause

Fix: Add package <directory name> as the first line.

Fixed

package demo

func Twice(n int) int {
	return n * 2
}

AES1103error

Attributes are allowed only on scripts and script fields.

Broken

package demo

@export
const Speed = 4.0
demo/main.aes:3:1: AES1103 attributes are only allowed on scripts, script fields and functions

Fix: Move the attribute above a script or a var inside a script, or remove it.

Fixed

package demo

script Mover {
	@export var Speed float = 4.0
}

AES1104error

Imports must come before any declaration.

Broken

package demo

const Name = "demo"

import "aego/log"

func Hello() {
	log.Info(Name)
}
demo/main.aes:5:1: AES1104 imports must come before declarations

Fix: Move the import to the top of the file, after the package clause.

Fixed

package demo

import "aego/log"

const Name = "demo"

func Hello() {
	log.Info(Name)
}

AES1105error

Packages cannot hold mutable state.

Broken

package demo

var score int

func Add(n int) {
	score = score + n
}
demo/main.aes:3:1: AES1105 package-level var is not allowed, use const or a script field

Fix: Use const for fixed values, or move the variable into a script as a field.

Fixed

package demo

script Score {
	var score int

	func Add(n int) {
		score = score + n
	}
}

AES1106error

Types, functions and constants are declared at package level.

Broken

package demo

func Clamp(n int) int {
	const Max = 10
	if n > Max {
		return Max
	}
	return n
}
demo/main.aes:4:2: AES1106 const declarations are not allowed inside a function

Fix: Move the declaration out of the function body.

Fixed

package demo

const Max = 10

func Clamp(n int) int {
	if n > Max {
		return Max
	}
	return n
}

AES1107error

The left side of := must be one new name.

Broken

package demo

type Stats struct {
	Hp int
}

func Heal(s Stats) Stats {
	s.Hp := 10
	return s
}
demo/main.aes:8:2: AES1107 left side of := must be a single name

Fix: Write name := value, or use = to assign to an existing field or element.

Fixed

package demo

type Stats struct {
	Hp int
}

func Heal(s Stats) Stats {
	s.Hp = 10
	return s
}

AES1108error

A composite literal key must be a field name.

Broken

package demo

type Stats struct {
	Hp int
}

func Fresh() Stats {
	return Stats{"Hp": 10}
}
demo/main.aes:8:15: AES1108 composite literal key must be a field name

Fix: Write Type{Field: value}.

Fixed

package demo

type Stats struct {
	Hp int
}

func Fresh() Stats {
	return Stats{Hp: 10}
}

AES1109error

The code is nested too deeply.

Broken

package demo

const Answer = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((42))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
demo/main.aes:3:528: AES1109 nesting is deeper than 512 levels

Fix: Split the expression or block into helper functions.

Fixed

package demo

const Answer = 42

AES1110error

The single part of a for loop must be a condition.

Broken

package demo

func Sum() int {
	total := 0
	for i := 0 {
		total = total + i
	}
	return total
}
demo/main.aes:5:6: AES1110 expected a loop condition, found a statement

Fix: Write for cond {} or for init; cond; post {}.

Fixed

package demo

func Sum() int {
	total := 0
	for i := 0; i < 3; i++ {
		total = total + i
	}
	return total
}

AES1111error

A slice type here must be followed by a literal.

Broken

package demo

func Empty() int {
	xs := []int
	return len(xs)
}
demo/main.aes:4:8: AES1111 a slice type here must be followed by a composite literal

Fix: Write []T{...}.

Fixed

package demo

func Empty() int {
	xs := []int{}
	return len(xs)
}

AES1112error

Only one value can be assigned per statement.

Broken

package demo

func Order(a int, b int) int {
	a, b = b, a
	return a - b
}
demo/main.aes:4:3: AES1112 multiple assignment is not supported, assign one value per statement

Fix: Split the assignment into several statements.

Fixed

package demo

func Order(a int, b int) int {
	t := a
	a = b
	b = t
	return a - b
}

AES1113error

else must follow the closing brace on the same line.

Broken

package demo

func Abs(n int) int {
	if n < 0 {
		return -n
	}
	else {
		return n
	}
}
demo/main.aes:7:2: AES1113 else must be on the same line as the closing brace of the if block

Fix: Write } else {.

Fixed

package demo

func Abs(n int) int {
	if n < 0 {
		return -n
	} else {
		return n
	}
}

Types

AES2001error

The name is not declared in this scope.

Broken

package demo

func Area(width int, height int) int {
	return width * heigth
}
demo/main.aes:4:17: AES2001 undefined: heigth

Fix: Check the spelling, declare it, or add the missing import.

Fixed

package demo

func Area(width int, height int) int {
	return width * height
}

AES2002error

The name refers to something that is not a type.

Broken

package demo

const Lives = 3

func Start() int {
	var n Lives
	return n
}
demo/main.aes:6:8: AES2002 Lives is not a type

Fix: Use a type name such as int, Vec2 or a declared struct.

Fixed

package demo

const Lives = 3

func Start() int {
	var n int = Lives
	return n
}

AES2003error

The value has a different type than the place it is used.

Broken

package demo

func Half(n int) float {
	return n / 2
}
demo/main.aes:4:9: AES2003 cannot use value of type int as float in return

Fix: Convert explicitly, for example float(x) or int(f).

Fixed

package demo

func Half(n int) float {
	return float(n) / 2
}

AES2004error

The operator is not defined for these operand types.

Broken

package demo

func Alive(hp int) bool {
	return !hp
}
demo/main.aes:4:9: AES2004 operator ! is not defined on int

Fix: Convert the operands to a type the operator supports.

Fixed

package demo

func Alive(hp int) bool {
	return hp > 0
}

AES2005error

The call passes a different number of arguments than the function expects.

Broken

package demo

func Damage(hp int, amount int) int {
	return hp - amount
}

func Hit() int {
	return Damage(10)
}
demo/main.aes:8:9: AES2005 Damage expects 2 arguments, got 1

Fix: Match the function signature; hover the function to see it.

Fixed

package demo

func Damage(hp int, amount int) int {
	return hp - amount
}

func Hit() int {
	return Damage(10, 3)
}

AES2006error

The expression is not a function.

Broken

package demo

func Fast() float {
	speed := 2.0
	return speed() * 2
}
demo/main.aes:5:9: AES2006 speed is not a function

Fix: Remove the parentheses or call a function instead.

Fixed

package demo

func Fast() float {
	speed := 2.0
	return speed * 2
}

AES2007error

The left side cannot be assigned to.

Broken

package demo

const Lives = 3

func Reset() {
	Lives = 5
}
demo/main.aes:6:2: AES2007 cannot assign to this expression

Fix: Assign to a variable, field, slice element or writable component field.

Fixed

package demo

script Game {
	var lives int = 3

	func Reset() {
		lives = 5
	}
}

AES2008error

The type has no field or member with this name.

Broken

package demo

func Height(v Vec2) float {
	return v.Z
}
demo/main.aes:4:11: AES2008 Vec2 has no field Z

Fix: Check the spelling; press Ctrl+Space after . to see the members.

Fixed

package demo

func Height(v Vec2) float {
	return v.Y
}

AES2009error

The name starts with a lowercase letter, so it is private to its package.

Broken · rules/rules.aes

package rules

const startLives = 3

Broken · demo/main.aes

package demo

import "game/rules"

func Lives() int {
	return rules.startLives
}
demo/main.aes:6:15: AES2009 rules.startLives is not exported

Fix: Rename it to start with an uppercase letter if other packages need it.

Fixed · rules/rules.aes

package rules

const StartLives = 3

Fixed · demo/main.aes

package demo

import "game/rules"

func Lives() int {
	return rules.StartLives
}

AES2010error

A constant needs a value known at compile time.

Broken

package demo

func Base() int {
	return 10
}

const Max = Base() * 2
demo/main.aes:7:13: AES2010 value of constant Max is not a constant expression

Fix: Use literals and other constants only.

Fixed

package demo

const Base = 10

const Max = Base * 2

AES2011error

Integer division by a constant zero.

Broken

package demo

const Steps = 0

const Size = 100 / Steps
demo/main.aes:5:14: AES2011 constant division by zero

Fix: Check the divisor.

Fixed

package demo

const Steps = 4

const Size = 100 / Steps

AES2012error

The constant does not fit its type.

Broken

package demo

const Huge = 9223372036854775808
demo/main.aes:3:14: AES2012 integer constant 9223372036854775808 overflows int

Fix: Use a smaller value or a wider type.

Fixed

package demo

const Huge = 9223372036854775807

AES2013error

The function can reach its end without returning a value.

Broken

package demo

func Sign(n int) int {
	if n < 0 {
		return -1
	}
}
demo/main.aes:7:1: AES2013 missing return at the end of Sign

Fix: Add a return statement on every path.

Fixed

package demo

func Sign(n int) int {
	if n < 0 {
		return -1
	}
	return 1
}

AES2014error

break or continue is outside a loop or switch.

Broken

package demo

func Check(n int) int {
	if n > 10 {
		break
	}
	return n
}
demo/main.aes:5:3: AES2014 break is not in a loop or switch

Fix: Move it inside a for loop, or use return.

Fixed

package demo

func Check(n int) int {
	if n > 10 {
		return 10
	}
	return n
}

AES2015error

A switch on an enum must handle every member.

Broken

package demo

enum Dir {
	Left
	Right
}

func Sign(d Dir) int {
	switch d {
	case Dir.Left:
		return -1
	}
	return 0
}
demo/main.aes:9:9: AES2015 switch on demo.Dir is not exhaustive, missing Right; add the cases or a default

Fix: Add the missing cases or a default.

Fixed

package demo

enum Dir {
	Left
	Right
}

func Sign(d Dir) int {
	switch d {
	case Dir.Left:
		return -1
	case Dir.Right:
		return 1
	}
	return 0
}

AES2016error

The same case value appears twice.

Broken

package demo

func Name(n int) string {
	switch n {
	case 1:
		return "one"
	case 1:
		return "two"
	}
	return "many"
}
demo/main.aes:7:7: AES2016 duplicate case 1

Fix: Remove the duplicate case.

Fixed

package demo

func Name(n int) string {
	switch n {
	case 1:
		return "one"
	case 2:
		return "two"
	}
	return "many"
}

AES2017error

A struct cannot contain itself by value.

Broken

package demo

type Room struct {
	Name string
	Next Room
}
demo/main.aes:3:6: AES2017 struct Room contains itself by value

Fix: Store the relation in a slice or remove the field.

Fixed

package demo

type Room struct {
	Name string
	Next []Room
}

AES2018error

The name is already declared in this scope.

Broken

package demo

func Total() int {
	sum := 1
	sum := 2
	return sum
}
demo/main.aes:5:2: AES2018 sum redeclared in this block

Fix: Rename one of the declarations or remove one of them.

Fixed

package demo

func Total() int {
	sum := 1
	sum = 2
	return sum
}

AES2019error

The returned value does not match the function result.

Broken

package demo

func Reset() {
	return 0
}
demo/main.aes:4:9: AES2019 Reset returns no value

Fix: Return a value of the declared type, or none in a function without a result.

Fixed

package demo

func Reset() {
	return
}

AES2020error

nil has no type of its own here.

Broken

package demo

script Follow {
	func Ready() {
		target := nil
		if target == nil {
			node.Destroy()
		}
	}
}
demo/main.aes:5:13: AES2020 use of untyped nil in a variable declaration

Fix: Give the variable an explicit reference type: var r NodeRef = nil.

Fixed

package demo

script Follow {
	func Ready() {
		var target NodeRef = nil
		if target == nil {
			node.Destroy()
		}
	}
}

AES2021error

The type argument is not valid here.

Broken

package demo

script Probe {
	func Ready() {
		if node.Has<Mana>() {
			node.Destroy()
		}
	}
}
demo/main.aes:5:15: AES2021 unknown component Mana

Fix: Use Get<T>/Has<T> with a component name, AssetRef<Texture|Scene|Prefab|Mesh>.

Fixed

package demo

script Probe {
	func Ready() {
		if node.Has<SpriteRenderer>() {
			node.Destroy()
		}
	}
}

AES2022error

A lifecycle method has the wrong signature.

Broken

package demo

script Clock {
	var elapsed float

	func Update() {
		elapsed = elapsed + 0.016
	}
}
demo/main.aes:6:7: AES2022 Update must have the signature func Update(dt float)

Fix: Use func Ready(), func Update(dt float), func FixedUpdate(dt float), func Reloaded().

Fixed

package demo

script Clock {
	var elapsed float

	func Update(dt float) {
		elapsed = elapsed + dt
	}
}

AES2023error

These types cannot be converted into each other.

Broken

package demo

func Flag(n int) bool {
	return bool(n)
}
demo/main.aes:4:9: AES2023 cannot convert int to bool

Fix: Convert through int, float or string as documented.

Fixed

package demo

func Flag(n int) bool {
	return n != 0
}

AES2024error

The expression does not produce a value.

Broken

package demo

func Zero() int {
	x := int
	return x
}
demo/main.aes:4:7: AES2024 int is a type, not a value

Fix: Call the function, or use a value instead of a type or package.

Fixed

package demo

func Zero() int {
	x := 0
	return x
}

AES2025error

The value is computed and then thrown away.

Broken

package demo

func Next(n int) int {
	n + 1
	return n
}
demo/main.aes:4:2: AES2025 value is not used

Fix: Assign the result or remove the expression.

Fixed

package demo

func Next(n int) int {
	n = n + 1
	return n
}

AES2026error

Constants refer to each other in a cycle.

Broken

package demo

const Width = Height * 2
const Height = Width / 2
demo/main.aes:3:7: AES2026 initialization cycle: constant Width refers to itself

Fix: Break the cycle with a literal value.

Fixed

package demo

const Width = 64
const Height = Width / 2

AES2027error

Constants can only be bool, int, float, string or enum.

No example

Every other constant type is rejected earlier as AES2010 or AES2003.

Fix: Use a script field for other types.

AES2028error

The composite literal does not fit its type.

Broken

package demo

type Point struct {
	X int
	Y int
}

func Origin() Point {
	return Point{0, 0, 0}
}
demo/main.aes:9:9: AES2028 demo.Point literal needs 2 values, got 3

Fix: Use all keyed or all positional values, with the right count.

Fixed

package demo

type Point struct {
	X int
	Y int
}

func Origin() Point {
	return Point{0, 0}
}

AES2029error

The function is too large to compile.

Broken

package demo

type Pose struct {
	A Transform2D
	B Transform2D
	C Transform2D
	D Transform2D
}

type Rig struct {
	Head Pose
	Body Pose
	Arms Pose
	Legs Pose
	Tail Pose
	Wing Pose
}

func Blend(a Rig, b Rig, c Rig, d Rig) Rig {
	return a
}
demo/main.aes:19:6: AES2029 game/demo.Blend cannot be compiled: it needs 288 registers, the limit is 255

Fix: Split it into smaller functions.

Fixed

package demo

type Pose struct {
	A Transform2D
	B Transform2D
	C Transform2D
	D Transform2D
}

type Rig struct {
	Head Pose
	Body Pose
	Arms Pose
	Legs Pose
	Tail Pose
	Wing Pose
}

func Blend(a Rig, b Rig) Rig {
	return a
}

AES2030error

The package was not built because a dependency has errors.

Broken · rules/rules.aes

package rules

const Lives = "three" * 1

Broken · demo/main.aes

package demo

import "game/rules"

func Lives() int {
	return rules.Lives
}
AES2030 package game/demo depends on broken package game/rules

Fix: Fix the errors in the named package.

Fixed · rules/rules.aes

package rules

const Lives = 3

Fixed · demo/main.aes

package demo

import "game/rules"

func Lives() int {
	return rules.Lives
}

AES2031warning

The variable is declared but never read.

Broken

package demo

func Score(hits int) int {
	bonus := hits * 10
	return hits
}
demo/main.aes:4:2: AES2031 bonus declared and not used

Fix: Use it or remove it.

Fixed

package demo

func Score(hits int) int {
	bonus := hits * 10
	return hits + bonus
}

AES2032error

Slice elements may occupy at most 32 value slots.

Broken

package demo

type Pose struct {
	A Transform2D
	B Transform2D
	C Transform2D
	D Transform2D
}

type Frame struct {
	Hips Pose
	Arms Pose
	Legs Pose
}

func Count() int {
	frames := []Frame{}
	return len(frames)
}
demo/main.aes:17:12: AES2032 slice element demo.Frame is 36 slots, the limit is 32

Fix: Make the element struct smaller or store several slices.

Fixed

package demo

type Pose struct {
	A Transform2D
	B Transform2D
	C Transform2D
	D Transform2D
}

func Count() int {
	hips := []Pose{}
	arms := []Pose{}
	return len(hips) + len(arms)
}

Coroutines, signals and events

AES2050error

yield suspends a coroutine, so it is allowed only inside a function declared as coroutine.

Broken

package demo

script Blink {
	func Ready() {
		yield wait(0.5)
		node.Destroy()
	}
}
demo/main.aes:5:3: AES2050 yield is only allowed in a coroutine, declare it as func Ready(...) coroutine

Fix: Declare the method as func Name() coroutine and start it with start Name().

Fixed

package demo

script Blink {
	func Ready() {
		start Later()
	}

	func Later() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}

AES2051error

A coroutine cannot be called like a plain function.

Broken

package demo

script Blink {
	func Ready() {
		Later()
	}

	func Later() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}
demo/main.aes:5:3: AES2051 coroutine Later is called without start, write start Later(...)

Fix: Write start Name(args); keep the result in a Coroutine field to stop it later.

Fixed

package demo

script Blink {
	func Ready() {
		start Later()
	}

	func Later() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}

AES2052error

start runs a coroutine method of the current script.

Broken

package demo

script Blink {
	func Ready() {
		start Vanish()
	}

	func Vanish() {
		node.Destroy()
	}
}
demo/main.aes:5:9: AES2052 start needs a coroutine method of this script, Vanish is not one

Fix: Mark the method with coroutine after its signature, or call a plain method directly.

Fixed

package demo

script Blink {
	func Ready() {
		start Vanish()
	}

	func Vanish() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}

AES2053error

A coroutine is a script method and returns no value.

Broken

package demo

func Pause() coroutine {
	yield wait(1.0)
}
demo/main.aes:3:6: AES2053 coroutine Pause must be a script method without a result

Fix: Move it into a script and remove the result type; pass results through fields or signals.

Fixed

package demo

script Pauser {
	func Pause() coroutine {
		yield wait(1.0)
	}
}

AES2054error

The handler parameters must match the signal parameters exactly.

Broken

package demo

import "aego/log"

script Health {
	signal Hit(amount int)

	func Ready() {
		Hit.Connect(OnHit)
	}

	func OnHit(amount float) {
		log.Info("hit " + string(amount))
	}
}
demo/main.aes:9:15: AES2054 handler OnHit(float) does not match signal Hit(int)

Fix: Change the handler to take the same types in the same order as the signal.

Fixed

package demo

import "aego/log"

script Health {
	signal Hit(amount int)

	func Ready() {
		Hit.Connect(OnHit)
	}

	func OnHit(amount int) {
		log.Info("hit " + string(amount))
	}
}

AES2055error

Connect takes a plain method of this script or ref.Method; signals are emitted only by their own script.

Broken

package demo

script Health {
	signal Died()

	func Ready() {
		Died.Connect(Fade)
	}

	func Fade() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}
demo/main.aes:7:16: AES2055 Fade cannot handle a signal, use a plain method

Fix: Pass a method name like OnDied or other.OnDied; call Emit only on a signal of this script.

Fixed

package demo

script Health {
	signal Died()

	func Ready() {
		Died.Connect(OnDied)
	}

	func OnDied() {
		start Fade()
	}

	func Fade() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}

AES2056error

Ready, Update, FixedUpdate and Reloaded are called by the engine and cannot be coroutines.

Broken

package demo

script Blink {
	func Ready() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}
demo/main.aes:4:7: AES2056 lifecycle method Ready cannot be a coroutine, start one from it instead

Fix: Keep the lifecycle method plain and write start Name() inside it.

Fixed

package demo

script Blink {
	func Ready() {
		start Vanish()
	}

	func Vanish() coroutine {
		yield wait(0.5)
		node.Destroy()
	}
}

AES2057error

wait and waitUnscaled take seconds as float, frames and fixed take a count as int, a bare yield value must be a Coroutine.

Broken

package demo

script Blink {
	func Ready() {
		start Vanish(2)
	}

	func Vanish(seconds int) coroutine {
		yield wait(seconds)
		node.Destroy()
	}
}
demo/main.aes:9:14: AES2057 yield wait needs float, a Coroutine or an awaitable handle, not int

Fix: Convert the value, for example yield wait(float(n)) or yield frames(int(t)).

Fixed

package demo

script Blink {
	func Ready() {
		start Vanish(2)
	}

	func Vanish(seconds int) coroutine {
		yield wait(float(seconds))
		node.Destroy()
	}
}

AES2058error

ScriptRef and GetScript need the name of a script type.

Broken

package demo

script Player {
	var enemy ScriptRef<Enemy>
}
demo/main.aes:4:22: AES2058 unknown script type Enemy, import the package that declares it

Fix: Use the script name, or pkg.Name when the short name is ambiguous.

Fixed

package demo

script Enemy {
}

script Player {
	var enemy ScriptRef<Enemy>
}

AES2059error

Lifecycle methods and coroutines run only on their own instance.

Broken

package demo

script Enemy {
	func Ready() {
	}
}

script Player {
	var enemy ScriptRef<Enemy>

	func Respawn() {
		enemy.Ready()
	}
}
demo/main.aes:12:9: AES2059 Enemy.Ready cannot be called through a ScriptRef, lifecycle methods and coroutines run only on their own instance

Fix: Call a plain method of the target that does the work, or connect to a signal.

Fixed

package demo

script Enemy {
	func Ready() {
		Reset()
	}

	func Reset() {
	}
}

script Player {
	var enemy ScriptRef<Enemy>

	func Respawn() {
		enemy.Reset()
	}
}

AES2060error

A script method named after an engine event receives that event and must match its signature.

Broken

package demo

script Pickup {
	func OnTriggerEnter(other int) {
		node.Destroy()
	}
}
demo/main.aes:4:7: AES2060 OnTriggerEnter handles the engine event OnTriggerEnter and must have the signature func OnTriggerEnter(NodeRef)

Fix: Use the parameter types shown in the hover for the event, or rename the method if it is not meant to be a handler.

Fixed

package demo

script Pickup {
	func OnTriggerEnter(other NodeRef) {
		node.Destroy()
	}
}

AES2061error

Engine event handlers are called only by the engine.

Broken

package demo

script Pickup {
	func OnTriggerEnter(other NodeRef) {
		node.Destroy()
	}

	func Collect() {
		OnTriggerEnter(nil)
	}
}
demo/main.aes:9:3: AES2061 OnTriggerEnter is an engine event handler and only the engine calls it, move the shared code into a plain method

Fix: Move the shared code into a plain method and call that from the handler and from your code.

Fixed

package demo

script Pickup {
	func OnTriggerEnter(other NodeRef) {
		Collect()
	}

	func Collect() {
		node.Destroy()
	}
}

Attributes

AES3001error

Only scalar, vector, enum and reference fields can be exported.

Broken

package demo

script Path {
	@export var Points []Vec2
}
demo/main.aes:4:21: AES3001 fields of type []Vec2 cannot be exported

Fix: Remove @export or change the field type.

Fixed

package demo

script Path {
	@export var Start Vec2
	var points []Vec2
}

AES3002error

The attribute is not known.

Broken

package demo

@tool
script Grid {
}
demo/main.aes:3:2: AES3002 unknown attribute @tool

Fix: Use @export, @former, @hide or @pause.

Fixed

package demo

script Grid {
}

AES3003error

The attribute argument is not valid.

Broken

package demo

script Mover {
	@export(min=5, max=1) var Speed int
}
demo/main.aes:4:2: AES3003 min 5 is greater than max 1

Fix: See the attribute in the Script Reference; hover it for the accepted arguments.

Fixed

package demo

script Mover {
	@export(min=1, max=5) var Speed int
}

AES3004error

The attribute or argument is given twice.

Broken

package demo

script Mover {
	@export
	@export
	var Speed float
}
demo/main.aes:5:2: AES3004 @export is given twice

Fix: Keep one.

Fixed

package demo

script Mover {
	@export
	var Speed float
}

AES3005error

The attribute does not apply to this declaration.

Broken

package demo

@export
script Mover {
	var Speed float
}
demo/main.aes:3:1: AES3005 @export applies to script fields, not to scripts

Fix: Move it to a script or field, or remove it.

Fixed

package demo

script Mover {
	@export var Speed float
}

AES3006error

A field default must be a constant.

Broken

package demo

func Start() int {
	return 3
}

script Player {
	var lives int = Start()
}
demo/main.aes:8:18: AES3006 initial value of lives must be a constant

Fix: Use a literal or constant, or set the value in Ready.

Fixed

package demo

func Start() int {
	return 3
}

script Player {
	var lives int

	func Ready() {
		lives = Start()
	}
}

AES3007error

Only scalar, vector, enum, node and asset fields can be saved.

Broken

package demo

script Inventory {
	@persist var items []string
}
demo/main.aes:4:21: AES3007 fields of type []string cannot be saved; save what they point at in OnSave instead

Fix: Remove @persist and save the value in OnSave instead.

Fixed

package demo

script Inventory {
	@persist var gold int
	var items []string
}

Packages and imports

AES4001error

The package clause must match the directory name.

Broken · level/main.aes

package demo

const Width = 64
level/main.aes:1:9: AES4001 package demo must be named level after its directory

Fix: Rename the package clause or move the file.

Fixed · level/main.aes

package level

const Width = 64

AES4002error

No script package or engine module has this path.

Broken

package demo

import "aego/sound"

func Beep() {
	sound.Play()
}
demo/main.aes:3:8: AES4002 cannot find package "aego/sound"

Fix: Check the path; script packages are directories under scripts/.

Fixed

package demo

import "aego/log"

func Beep() {
	log.Info("beep")
}

AES4003error

The package is imported twice.

Broken

package demo

import (
	"aego/log"
	"aego/log"
)

func Hello() {
	log.Info("hello")
}
demo/main.aes:5:2: AES4003 log is imported twice

Fix: Remove one import.

Fixed

package demo

import "aego/log"

func Hello() {
	log.Info("hello")
}

AES4004error

A package cannot import itself.

Broken

package demo

import "game/demo"

const Width = 64
demo/main.aes:3:8: AES4004 package game/demo imports itself

Fix: Remove the import.

Fixed

package demo

const Width = 64

AES4005error

Packages import each other in a cycle.

Broken · rules/rules.aes

package rules

import "game/demo"

const Lives = 3

const Title = demo.Name

Broken · demo/main.aes

package demo

import "game/rules"

const Lives = rules.Lives

const Name = "demo"
rules/rules.aes:3:8: AES4005 import cycle: game/demo → game/rules → game/demo

Fix: Move the shared code into a third package.

Fixed · rules/rules.aes

package rules

const Lives = 3

Fixed · demo/main.aes

package demo

import "game/rules"

const Lives = rules.Lives

const Name = "demo"

AES4006error

The name is declared twice.

Broken

package demo

const Speed = 1.0

const Speed = 2.0
demo/main.aes:5:7: AES4006 Speed redeclared in package game/demo

Fix: Rename or remove one declaration.

Fixed

package demo

const Speed = 1.0

const RunSpeed = 2.0

AES4007error

An import uses the same name as a declaration.

Broken

package demo

import "aego/log"

const log = 1

func Hello() {
	log.Info("hello")
}
demo/main.aes:3:8: AES4007 log is both an import and a declaration in game/demo

Fix: Rename the declaration.

Fixed

package demo

import "aego/log"

const logLevel = 1

func Hello() {
	log.Info("hello")
}

AES4008warning

The import is not used.

Broken

package demo

import "aego/log"

const Width = 64
demo/main.aes:3:8: AES4008 "aego/log" imported and not used

Fix: Remove it.

Fixed

package demo

const Width = 64

AES4009error

Package paths under aego/ belong to the engine.

No example

Needs a project whose module path starts with aego/; projects use their own module.

Fix: Change the project module.

AES4010error

A script package and an engine module share the same path.

No example

Needs a native module in the project with the same path as a script directory.

Fix: Rename the script directory.

Engine bindings

AES5001error

The engine or native module has no such member.

Broken

package demo

import "aego/log"

func Hello() {
	log.Shout("hello")
}
demo/main.aes:6:6: AES5001 aego/log has no function Shout

Fix: Check the name; press Ctrl+Space after the module name to list members.

Fixed

package demo

import "aego/log"

func Hello() {
	log.Info("hello")
}

Runtime faults

AES6001error

The callback ran more instructions than its budget, usually an endless loop.

Broken

package demo

script Spinner {
	var turns int

	func Update(dt float) {
		for turns >= 0 {
			turns++
		}
	}
}
demo/main.aes:7: AES6001 instruction budget exceeded

Fix: Make sure every loop ends within one frame.

Fixed

package demo

script Spinner {
	var turns int

	func Update(dt float) {
		for turns < 10 {
			turns++
		}
	}
}

AES6002error

A native Go binding panicked.

No example

Raised when the Go code behind a native binding panics.

Fix: Fix the Go function; the Console shows its stack.

AES6003error

Calls nested more than 256 levels, usually endless recursion or re-emitting a signal from its handler.

Broken

package demo

func Count(n int) int {
	return Count(n + 1)
}

script Counter {
	var total int

	func Ready() {
		total = Count(0)
	}
}
demo/main.aes:4: AES6003 call depth exceeds 256

Fix: Add a stopping condition.

Fixed

package demo

func Count(n int) int {
	if n >= 10 {
		return n
	}
	return Count(n + 1)
}

script Counter {
	var total int

	func Ready() {
		total = Count(0)
	}
}

AES6004error

A reference is nil or its node, component or script instance no longer exists.

Broken

package demo

script Chaser {
	var target ScriptRef<Chaser>

	func Ready() {
		target.Chase()
	}

	func Chase() {
	}
}
demo/main.aes:7: AES6004 script reference is nil or its instance is gone

Fix: Check if ref != nil and IsAlive before use.

Fixed

package demo

script Chaser {
	var target ScriptRef<Chaser>

	func Ready() {
		if target != nil {
			target.Chase()
		}
	}

	func Chase() {
	}
}

AES6005error

The slice index is outside the slice.

Broken

package demo

script Waves {
	var sizes []int
	var last int

	func Ready() {
		sizes = []int{3, 5, 8}
		last = sizes[3]
	}
}
demo/main.aes:9: AES6005 index 3 out of range for length 3

Fix: Check the index against len(slice).

Fixed

package demo

script Waves {
	var sizes []int
	var last int

	func Ready() {
		sizes = []int{3, 5, 8}
		last = sizes[len(sizes)-1]
	}
}

AES6006error

Integer division by zero at runtime.

Broken

package demo

script Stats {
	var kills int
	var deaths int
	var ratio int

	func Ready() {
		ratio = kills / deaths
	}
}
demo/main.aes:9: AES6006 integer division by zero

Fix: Check the divisor before dividing.

Fixed

package demo

script Stats {
	var kills int
	var deaths int
	var ratio int

	func Ready() {
		if deaths > 0 {
			ratio = kills / deaths
		}
	}
}

AES6007error

A string or slice handle is invalid.

No example

Means the engine passed a damaged string or slice handle; report it as a bug.

Fix: Report this as an engine bug.

AES6008error

A function reached its end without returning.

No example

The compiler reports a missing return as AES2013 before the code can run.

Fix: Add the missing return.

AES6009error

A call or binding could not be linked.

No example

Raised when compiled scripts do not match the engine or native code they were built against.

Fix: Rebuild the scripts and native code.

AES6010error

An engine or native function reported an error.

Broken

package demo

import "aego/scene"

script Gun {
	var Bullet AssetRef<Prefab>

	func Ready() {
		scene.Instantiate(Bullet, nil)
	}
}
demo/main.aes:9: AES6010 prefab reference is nil

Fix: Read the message; it names the cause.

Fixed

package demo

import "aego/scene"

script Gun {
	var Bullet AssetRef<Prefab>

	func Ready() {
		if Bullet != nil {
			scene.Instantiate(Bullet, nil)
		}
	}
}

Compiled code

AES6100error

A compiled artifact is corrupt.

No example

Reported when a compiled artifact on disk is damaged, not by source code.

Fix: Reimport the scripts (Assets → Reimport).

Assets

ANC001error

A condition does not fit its parameter

A transition has a condition on a parameter the controller does not declare, or with an operator its kind does not have: gt, ge, lt and le compare int and float parameters, a bool takes eq and ne or no operator, a trigger takes no operator.

Fix. Declare the parameter with param "Name" kind=…, or change the operator to one its kind has.

Details

The controller keeps its last good version.

ANC002error

A state that does not exist

The entry, or the source or target of a transition, names a state the controller does not declare, or the controller has no states.

Fix. Declare the state with state "Name" …, or fix the name; a transition from every state is written transition "any" to="…".

Details

The controller keeps its last good version.

ANC003error

A transition into its own state without exit time

A transition goes from a state into the same state and has no exitTime.

Fix. Give the transition an exitTime, for example exitTime=1 to restart after one pass of the clip, or remove it.

Details

Its conditions would restart the state on every step they hold, so the clip never gets past its first frame.

ANC004warning

The clip of a state is not loaded

A state names a clip that is not imported, or the clip failed to import.

Fix. Import the clip or pick another one for the state.

Details

The state still works in the graph, with its transitions and exit times, but it plays nothing: the properties keep the values the last state gave them.

During Play the same code is logged once per state.

ANC005error

Instant transitions form a loop

Transitions without duration, conditions or exit time lead from one state back to it, directly or through other states.

Fix. Give one transition of the loop a condition, an exitTime or a duration.

Details

Each step would run around the loop until the limit of eight transitions per step. The controller keeps its last good version.

ANC006error

The controller cannot be read

The controller text has something the importer does not know: an unknown block, attribute or field, an attribute written as a field inside the block (or the other way round), or a value of the wrong type.

Fix. Correct the line the message names.

Details

Nothing is ignored silently, so a misspelt setting never vanishes. The message names the line and, for a setting in the wrong place, shows how to write it. The controller keeps its last good version.

The blocks and their settings are listed in Controllers.

ANM001error

A track cannot be animated

The clip has something the importer cannot read: a kind that does not animate, such as string, a key value that does not match the kind, or an unknown block, attribute or field.

Fix. Give the track one of the kinds in Clips, and check that the property path names a field of a component on the target node.

Details

Nothing is ignored silently: an attribute written as a field inside its block, such as start inside frames, is refused with the line to write instead (frames "Slash" start=0.08 {). The clip keeps its last good version.

During Play the same code is logged when a track's property does not exist on its node or has another type than the track's kind; that track is off and the rest of the clip plays.

ANM002error

A key or an event outside the clip

A key or an event has a time below 0 or past the clip's length, or the length is not positive.

Fix. Move the key inside the clip or make the clip longer.

Details

The clip keeps its last good version.

ANM003error

An event that is not declared

The clip has an event whose name is not declared in Project Settings → Animation.

Fix. Declare the event in the animation section of the project, or rename it in the clip to a declared one.

Details

The event never runs; the rest of the clip plays.

AUD001error

The sound file cannot be decoded

An imported .wav or .ogg is damaged or uses a format the decoder does not read (WAV must be PCM 8, 16, 24 or 32 bit or float; OGG must be Vorbis).

Fix. Export the sound again as 16-bit PCM WAV or Ogg Vorbis.

Details

The clip plays nothing.

AUD002warning

Loop points outside the sound

The clip's Loop Start and Loop End are outside the sound or in the wrong order, so the whole sound loops instead.

Fix. Open the clip in the Inspector and drag the loop markers inside the waveform, or clear them.

AUD006error

The Audio Event cannot play

An Audio Event has no variants, or it is spatial with Max Distance not larger than Min Distance.

Fix. Add at least one clip to Variants, and for a spatial event make Max Distance larger than Min Distance.

Details

Playing it does nothing.

MAT004error

A material, shader domain or texture reference is incompatible with its consumer.

A material's shader domain, schema or texture bindings cannot be used by its consumer.

Fix. Follow the reported asset and full cause to repair the incompatible assignment or dependency, keeping the intended shader domain and stable references.

Identify the incompatible assignment

Read the reason after the code. MAT004 is used for a shader-domain mismatch, a missing shader schema or material reference, and unresolved or incompatible texture bindings. Some unresolved references are warnings and are retained; the code alone does not determine whether a file was lost.

Select the Console or Problems entry. Find its asset path or AssetID, then inspect the material's shader and its actual consumer. In a nested SHD009, keep the outer driver error and the inner MAT004 reason: they describe different levels of the failure.

Reason in the message Correction
postfx shader cannot draw sprite geometry Use that material in a camera Post Process Custom effect. Choose a sprite-compatible material for SpriteRenderer; retain the postfx shader's purpose.
A shader domain changed or the consumer needs another domain Check the shader selected by the material and the consuming component. Restore the intended compatible assignment.
Shader schema or material asset is unavailable Follow the referenced AssetID to its source and current import error. Repair that dependency rather than replacing IDs arbitrarily.
A texture cannot be resolved Locate its .meta and source, check the referenced subasset and its current import result. A retained reference is not a successful load.
Normal/emission/region semantics are incompatible Assign a texture imported for that surface role and matching region semantics. Normal data must be linear and not premultiplied; emission must use the supported RGB or mask role.

Verify the fix

Save the corrected source or assignment, import the affected dependency if needed, and inspect the same consumer during Play. Check that the intended sprite, normal, emission or camera effect appears and that the full cause no longer occurs. Keep unrelated materials and AssetIDs unchanged. See Materials and shaders and camera post-processing.

SHD009error

The graphics driver could not compile, link or validate a shader candidate.

The renderer rejected a prepared shader variant.

Fix. Find the named asset and correct the specific compile, layout or consumer error in the full cause before retrying that variant.

Find the source and cause

The code identifies the failed candidate, not necessarily a syntax error in the source. Read the full cause: it may be a driver compile log, an incompatible uniform layout, an old prepared shader or a nested MAT004 material/domain mismatch.

  1. Select the Console message and read its details. Keep the code, asset, file, line, graphics backend and complete err text together. A line of 0 means no source line was identified; do not treat it as the first line of the shader.
  2. Find that AssetID or source path in Assets. Inspect the material's shader reference and the component or Post Process effect that consumes it. A failed sprite preview does not prove that a postfx shader is invalid for camera post-processing.
  3. If the nested cause says MAT004: postfx shader cannot draw sprite geometry, correct the consumer: use the postfx material in the camera's Custom effect, not on SpriteRenderer. Do not change #pragma postfx to a sprite domain merely to silence this message.
  4. For a compiler or link error, follow the reported source file and mapped line. For a layout mismatch, compare the reported member, type and offset with the shader/material declaration. If the message explicitly identifies a legacy prepared shader, reimport that source with the matching engine version.

Verify the fix

Run the same consumer and shader variant again on the affected backend. Verify the intended visual effect and that no new SHD009 is reported. Reimporting every asset is not a diagnosis and cannot fix a domain mismatch. If it persists, attach the material, shader and includes, the smallest scene, engine version, backend and driver log to the reproduction.

Components

ANM004warning

Two drivers for one property

A track animates a property that something else already drives: another track of an animation, or Motion 2D, which moves the position and rotation of its node.

Fix. Animate a child node instead of the node with Motion 2D, or remove one of the two tracks.

Details

The later track is off, so the property never gets two values in one step.

It appears during Play, when the clip is bound to the scene.

Example: ANM004.aescene

Scene1 node
Hero
Transform
position[0, 0]rotation0scale[1, 1]
Rigid Body 2D
typeenumkinematicfixedRotationbooltrueallowSleepboolfalse
Motion 2D
modeenumplatformer
Animation Player
clipAnimClipasset("ae900000000000000000000000000b11")playOnStartbooltruespeedfloat1

ANM006error

A transform track on a physics body

A track animates the transform of a node with a physics body that moves on its own.

Fix. Animate a kinematic body with authority=simulation, so the animation moves it with its velocity; animate a child node for a body that physics moves.

Details

On a dynamic body every transform track is off. On a kinematic body a track with authority=presentation is off, because physics draws that body. A static body is moved, with a warning: it is teleported on every step.

It appears during Play, when the body exists.

Example: ANM006.aescene

Scene1 node
Ball
Transform
position[0, 0]rotation0scale[1, 1]
Animation Player
clipAnimClipasset("ae900000000000000000000000000b11")playOnStartbooltruespeedfloat1

AUD003warning

Audio Source 2D has nothing to play

An Audio Source 2D needs a Clip or an Event.

Fix. Pick a Clip or an Event.

Details

With neither it is silent. With both, it plays the Event and ignores the Clip and the playback fields (reported as information).

Example: AUD003.aescene

Scene1 node
Speaker
Transform
position[0, 0]rotation0scale[1, 1]

AUD004info

Spatial sound without a listener

A spatial Audio Source 2D pans and fades by distance to the active Audio Listener 2D.

Fix. Add an Audio Listener 2D to the player or the camera when you want the sound heard from somewhere else.

Details

The scene has none, so the sound is heard from the camera. This is information, not an error: a game with one camera often wants exactly that.

Example: AUD004.aescene

Scene1 node
Speaker
Transform
position[0, 0]rotation0scale[1, 1]

AUD005warning

More than one active listener

Only the first active Audio Listener 2D in the hierarchy is used; this one is ignored.

Fix. Keep one listener active, for example on the player, and turn Active off on the others.

Example: AUD005.aescene

Scene2 nodes
Player
Transform
position[0, 0]rotation0scale[1, 1]
Camera
Transform
position[0, 0]rotation0scale[1, 1]

CAM001warning

Camera Follow 2D or Camera Shake 2D without a virtual camera

Camera Follow 2D and Camera Shake 2D act on the Virtual Camera 2D of their own node.

Fix. Add a Virtual Camera 2D to the node.

Details

Without one they do nothing.

Add Component adds it on its own when you add Camera Follow 2D.

Example: CAM001.aescene

Scene1 node
Follower
Transform
position[0, 0]rotation0scale[1, 1]

CAM002warning

Camera Zone 2D with no camera

A Camera Zone 2D switches to a camera while the target is inside its Area.

Fix. Pick a virtual camera in Camera, or add a Virtual Camera 2D to the zone node.

Details

It uses the Camera field or, when that is empty, a Virtual Camera 2D on its own node; with neither it has nothing to switch to.

Example: CAM002.aescene

Scene1 node
Zone
Transform
position[0, 0]rotation0scale[1, 1]
Camera Zone 2D
areaRect[-4, -3, 8, 6]

CAM003warning

A rectangle with no area

A Virtual Camera 2D with Use Bounds, or a Camera Zone 2D, has a Bounds or Area rectangle of zero width or height.

Fix. Drag the rectangle handles in the Scene View, or turn Use Bounds off.

Details

A camera is then not clamped, and a zone never triggers.

Example: CAM003.aescene

Scene1 node
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Virtual Camera 2D
useBoundsbooltrueboundsRect[0, 0, 0, 0]

CAM004warning

Camera Follow 2D has no Target

Camera Follow 2D moves its virtual camera after a node.

Fix. Pick the node to follow in Target, usually the player.

Details

With Target empty the camera stays where it is.

Example: CAM004.aescene

Scene1 node
Camera
Transform
position[0, 0]rotation0scale[1, 1]

GMP001error

Motion 2D on a body that is not kinematic

Motion 2D moves its Rigid Body 2D by casting and setting the position each step, so the body must be kinematic.

Fix. Set the Type of Rigid Body 2D to kinematic.

Details

On a dynamic or static body the physics and the controller fight. This error blocks Play.

Adding Motion 2D does this on its own.

Example: GMP001.aescene

Scene1 node
Hero
Transform
position[0, 0]rotation0scale[1, 1]

GMP002error

Jump Height without gravity

In platformer mode Motion 2D derives the jump speed from Jump Height and gravity.

Fix. Set Jump Speed, or give the controller a Gravity Scale.

Details

With Gravity Scale 0 there is no gravity, so the jump speed cannot be derived.

Example: GMP002.aescene

Scene1 node
Hero
Transform
position[0, 0]rotation0scale[1, 1]
Rigid Body 2D
typeenumkinematic
Motion 2D
modeenumplatformergravityScalefloat0jumpSpeedfloat0jumpHeightfloat2

GMP005warning

State Machine states are wrong

A State Machine has no states, an empty or duplicate state name, or an Initial state that is not in States.

Fix. List the states once each, by name, and pick Initial from them (empty starts in the first).

Example: GMP005.aescene

Scene1 node
Enemy
Transform
position[0, 0]rotation0scale[1, 1]

GMP006warning

Hurtbox 2D without Health

A Hurtbox 2D passes hits to a Health: the one in its Health field, or else the first Health on its node or above it.

Fix. Add a Health to the hurtbox node or a parent, or pick one in the Health field.

Details

This one finds none, so hits on it are ignored. It is a warning because the Health may be added later by a script.

Example: GMP006.aescene

Scene1 node
Crate
Transform
position[0, 0]rotation0scale[1, 1]
Hurtbox 2D
areaRect[-0.5, -0.5, 1, 1]

LGT001error

Invalid light parameters

A light is excluded because its type, intensity, range, height or angle is invalid.

Fix. Choose a supported type, finite nonnegative intensity and height, positive local range, full Spot angles satisfying 0 <= InnerAngle <= OuterAngle <= pi, and Directional elevation in (0, pi/2].

Example: LGT001.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]
Light 2D
typeenumpointintensityfloat-1rangefloat5heightfloat1

LGT002error

Directional shadows are unsupported

Directional lights illuminate surfaces but cannot cast local shadow masks.

Fix. Disable Shadows on the Directional light or use a Point, Spot or Sprite light for local shadows.

Example: LGT002.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]
Light 2D
typeenumdirectionalshadowsbooltrueelevationfloat0.7

LGT003error

Invalid or conflicting lighting environment

The output has conflicting environments, invalid settings or an unresolved camera or preview selection.

Fix. Select one environment per output with a valid camera, nonnegative ambient, positive exposure, power-of-two shadow resolution from 64 to 2048 and a shadow budget of 0 to 16, or reset a stale Scene View selection.

Example: LGT003.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]

LGT004error

Invalid occluder contour

The shadow contour has unsupported geometry, an invalid source or an unknown culling mode.

Fix. Choose a supported source and winding, then use handles to make a simple polygon of 3–256 finite vertices or a nonintersecting open chain with no zero-length edges.

Example: LGT004.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]
Light Occluder 2D
sourceenumpolygonclosedbooltruepolygon[]Vec2[[0, 0], [2, 2], [0, 2], [2, 0]]

LGT005warning

Missing shadow shape provider or shape

The occluder cannot resolve the owner, geometry provider or shape key of its saved reference.

Fix. Restore the owner or provider, select an available shape or draw a manual polygon that works without Physics.

Example: LGT005.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]
Light Occluder 2D
sourceenumshapeProvidershapeNodeNodeRefnode("d5ee000000000000000000000000ffff")

LGT006warning

Missing or incompatible surface texture

A lighting texture reference is missing or resolves to a texture with incompatible semantics.

Fix. Restore the saved AssetID or assign a compatible linear normal or mask, checking the source dimensions and trim of paired frames.

Example: LGT006.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]
Light 2D
typeenumspritecookieTextureasset("d5ee000000000000000000000000ffff")rangefloat5heightfloat1

LGT007warning

Invalid lighting presentation transform

A non-finite or degenerate presentation transform prevents the light or occluder from using its intended orientation.

Fix. Check the node and its parents for zero scales or non-finite coordinates in both authored and interpolated poses.

Example: LGT007.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[0, 1]
Light 2D
typeenumpointrangefloat5heightfloat1

LGT008error

Lighting geometry or resource budget exceeded

A lighting input exceeds a resource budget, or the requested target cannot represent the lighting output.

Fix. Read the reported limit or target reason, then simplify the contours, adjust the light budget, or compose additive energy over an opaque backdrop before display resolve.

Example: LGT008.aescene

Scene2 nodes
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat50viewportRect[0, 0, 1, 1]maskint-1activebooltrue
Diagnostic example
Transform
position[0, 0]rotation0scale[1, 1]
Light Occluder 2D
sourceenumpolygonclosedbooltruepolygon[]Vec2[[1, 0], [0.9997012, 0.0244458], [0.9988048, 0.0488769], [0.9973115, 0.0732788], [0.9952221, 0.097637], [0.9925379, 0.1219367], [0.9892604, 0.1461636], [0.9853917, 0.1703032], [0.980934, 0.1943409], [0.9758901, 0.2182625], [0.9702629, 0.2420537], [0.9640557, 0.2657002], [0.9572724, 0.2891878], [0.9499169, 0.3125027], [0.9419936, 0.3356307], [0.9335074, 0.3585581], [0.9244632, 0.3812713], [0.9148665, 0.4037565], [0.9047229, 0.4260005], [0.8940387, 0.4479898], [0.88282, 0.4697114], [0.8710738, 0.4911522], [0.8588069, 0.5122995], [0.8460267, 0.5331406], [0.8327408, 0.553663], [0.8189572, 0.5738546], [0.8046842, 0.5937031], [0.7899302, 0.6131968], [0.7747041, 0.632324], [0.7590149, 0.6510732], [0.7428721, 0.6694334], [0.7262853, 0.6873934], [0.7092644, 0.7049425], [0.6918196, 0.7220704], [0.6739613, 0.7387667], [0.6557002, 0.7550214], [0.6370472, 0.7708248], [0.6180134, 0.7861676], [0.5986102, 0.8010404], [0.5788493, 0.8154345], [0.5587424, 0.8293413], [0.5383016, 0.8427523], [0.517539, 0.8556596], [0.4964671, 0.8680556], [0.4750984, 0.8799327], [0.4534458, 0.8912838], [0.4315222, 0.9021023], [0.4093407, 0.9123816], [0.3869145, 0.9221156], [0.3642571, 0.9312984], [0.3413819, 0.9399247], [0.3183027, 0.9479891], [0.2950333, 0.955487], [0.2715875, 0.9624137], [0.2479794, 0.9687653], [0.2242231, 0.9745378], [0.2003328, 0.9797279], [0.1763227, 0.9843324], [0.1522073, 0.9883486], [0.1280009, 0.9917741], [0.103718, 0.9946067], [0.079373, 0.996845], [0.0549807, 0.9984874], [0.0305555, 0.9995331], [0.006112, 0.9999813], [-0.0183351, 0.9998319], [-0.0427713, 0.9990849], [-0.0671819, 0.9977407], [-0.0915523, 0.9958003], [-0.1158681, 0.9932646], [-0.1401145, 0.9901353], [-0.1642773, 0.9864142], [-0.1883418, 0.9821035], [-0.2122938, 0.9772059], [-0.2361189, 0.9717242], [-0.2598029, 0.9656617], [-0.2833316, 0.959022], [-0.3066909, 0.9518092], [-0.329867, 0.9440274], [-0.3528458, 0.9356815], [-0.3756138, 0.9267763], [-0.3981573, 0.9173171], [-0.4204629, 0.9073098], [-0.4425171, 0.8967601], [-0.4643068, 0.8856744], [-0.485819, 0.8740594], [-0.5070409, 0.861922], [-0.5279597, 0.8492694], [-0.548563, 0.8361092], [-0.5688384, 0.8224493], [-0.5887738, 0.8082979], [-0.6083573, 0.7936633], [-0.6275772, 0.7785544], [-0.646422, 0.7629801], [-0.6648804, 0.7469498], [-0.6829415, 0.7304731], [-0.7005943, 0.7135598], [-0.7178285, 0.69622], [-0.7346336, 0.6784641], [-0.7509996, 0.6603026], [-0.7669168, 0.6417466], [-0.7823756, 0.6228069], [-0.7973668, 0.603495], [-0.8118814, 0.5838224], [-0.8259107, 0.5638009], [-0.8394464, 0.5434424], [-0.8524804, 0.5227591], [-0.8650049, 0.5017634], [-0.8770124, 0.4804677], [-0.8884957, 0.4588849], [-0.899448, 0.4370278], [-0.9098627, 0.4149095], [-0.9197335, 0.3925432], [-0.9290547, 0.3699424], [-0.9378206, 0.3471204], [-0.9460259, 0.3240909], [-0.9536659, 0.3008677], [-0.9607358, 0.2774647], [-0.9672316, 0.2538959], [-0.9731492, 0.2301753], [-0.9784852, 0.2063172], [-0.9832363, 0.1823357], [-0.9873998, 0.1582452], [-0.9909732, 0.1340602], [-0.9939542, 0.1097951], [-0.9963412, 0.0854643], [-0.9981327, 0.0610824], [-0.9993276, 0.0366641], [-0.9999253, 0.0122238], [-0.9999253, -0.0122238], [-0.9993276, -0.0366641], [-0.9981327, -0.0610824], [-0.9963412, -0.0854643], [-0.9939542, -0.1097951], [-0.9909732, -0.1340602], [-0.9873998, -0.1582452], [-0.9832363, -0.1823357], [-0.9784852, -0.2063172], [-0.9731492, -0.2301753], [-0.9672316, -0.2538959], [-0.9607358, -0.2774647], [-0.9536659, -0.3008677], [-0.9460259, -0.3240909], [-0.9378206, -0.3471204], [-0.9290547, -0.3699424], [-0.9197335, -0.3925432], [-0.9098627, -0.4149095], [-0.899448, -0.4370278], [-0.8884957, -0.4588849], [-0.8770124, -0.4804677], [-0.8650049, -0.5017634], [-0.8524804, -0.5227591], [-0.8394464, -0.5434424], [-0.8259107, -0.5638009], [-0.8118814, -0.5838224], [-0.7973668, -0.603495], [-0.7823756, -0.6228069], [-0.7669168, -0.6417466], [-0.7509996, -0.6603026], [-0.7346336, -0.6784641], [-0.7178285, -0.69622], [-0.7005943, -0.7135598], [-0.6829415, -0.7304731], [-0.6648804, -0.7469498], [-0.646422, -0.7629801], [-0.6275772, -0.7785544], [-0.6083573, -0.7936633], [-0.5887738, -0.8082979], [-0.5688384, -0.8224493], [-0.548563, -0.8361092], [-0.5279597, -0.8492694], [-0.5070409, -0.861922], [-0.485819, -0.8740594], [-0.4643068, -0.8856744], [-0.4425171, -0.8967601], [-0.4204629, -0.9073098], [-0.3981573, -0.9173171], [-0.3756138, -0.9267763], [-0.3528458, -0.9356815], [-0.329867, -0.9440274], [-0.3066909, -0.9518092], [-0.2833316, -0.959022], [-0.2598029, -0.9656617], [-0.2361189, -0.9717242], [-0.2122938, -0.9772059], [-0.1883418, -0.9821035], [-0.1642773, -0.9864142], [-0.1401145, -0.9901353], [-0.1158681, -0.9932646], [-0.0915523, -0.9958003], [-0.0671819, -0.9977407], [-0.0427713, -0.9990849], [-0.0183351, -0.9998319], [0.006112, -0.9999813], [0.0305555, -0.9995331], [0.0549807, -0.9984874], [0.079373, -0.996845], [0.103718, -0.9946067], [0.1280009, -0.9917741], [0.1522073, -0.9883486], [0.1763227, -0.9843324], [0.2003328, -0.9797279], [0.2242231, -0.9745378], [0.2479794, -0.9687653], [0.2715875, -0.9624137], [0.2950333, -0.955487], [0.3183027, -0.9479891], [0.3413819, -0.9399247], [0.3642571, -0.9312984], [0.3869145, -0.9221156], [0.4093407, -0.9123816], [0.4315222, -0.9021023], [0.4534458, -0.8912838], [0.4750984, -0.8799327], [0.4964671, -0.8680556], [0.517539, -0.8556596], [0.5383016, -0.8427523], [0.5587424, -0.8293413], [0.5788493, -0.8154345], [0.5986102, -0.8010404], [0.6180134, -0.7861676], [0.6370472, -0.7708248], [0.6557002, -0.7550214], [0.6739613, -0.7387667], [0.6918196, -0.7220704], [0.7092644, -0.7049425], [0.7262853, -0.6873934], [0.7428721, -0.6694334], [0.7590149, -0.6510732], [0.7747041, -0.632324], [0.7899302, -0.6131968], [0.8046842, -0.5937031], [0.8189572, -0.5738546], [0.8327408, -0.553663], [0.8460267, -0.5331406], [0.8588069, -0.5122995], [0.8710738, -0.4911522], [0.88282, -0.4697114], [0.8940387, -0.4479898], [0.9047229, -0.4260005], [0.9148665, -0.4037565], [0.9244632, -0.3812713], [0.9335074, -0.3585581], [0.9419936, -0.3356307], [0.9499169, -0.3125027], [0.9572724, -0.2891878], [0.9640557, -0.2657002], [0.9702629, -0.2420537], [0.9758901, -0.2182625], [0.980934, -0.1943409], [0.9853917, -0.1703032], [0.9892604, -0.1461636], [0.9925379, -0.1219367], [0.9952221, -0.097637], [0.9973115, -0.0732788], [0.9988048, -0.0488769], [0.9997012, -0.0244458]]

PFX001error

Invalid post-process stack

The camera cannot use the named Post Process stack with its current effects, parameters or output.

Fix. Follow the reason shown for the camera in the Inspector and correct the indicated setting, such as a Vignette intensity outside the range from 0 to 1.

Example: PFX001.aescene

Scene1 node
Camera
Post Process
enabledbooltrueeffects[]render2d.PostEffect[{ typeID="postfx.vignette" instanceID="invalid" enabled=true version=1 parameters=[{ name="Intensity" kind=float value=[1.5, 0, 0, 0] integer=0 boolean=false asset=asset("00000000000000000000000000000000") }] }]

PHY001error

A circle or capsule under non-uniform scale

Circle and capsule colliders keep their round shape, so the node and its parents must scale X and Y by the same amount.

Fix. Scale the node uniformly and change Radius instead, or use a Box or Polygon collider for a stretched shape.

Details

With a scale of (2, 1) the collider cannot follow the drawing and is not created.

Example: PHY001.aescene

Scene2 nodes
Ball
Transform
position[0, 0]rotation0scale[2, 1]
Ground
Transform
position[0, 3]rotation0scale[1, 1]

PHY002error

A collider shape that cannot be built

A polygon has fewer than three points, more than eight, points on one line or a concave outline, or a shape has a zero or negative size.

Fix. Give a polygon three to eight points that form a convex outline, split a concave shape into several colliders, and keep sizes and radii above zero.

Details

The collider is not created, and the error blocks Play.

Example: PHY002.aescene

Scene1 node
Wedge
Transform
position[0, 0]rotation0scale[1, 1]
Polygon Collider 2D
points[]Vec2[[0, 0], [1, 0], [2, 0]]

PHY003error

The body cannot be created

The Rigid Body 2D has a value the physics world refuses: a mass override of zero on a dynamic body, negative damping, a layer outside 0..31, or a transform or velocity that is not a number.

Fix. Read the message for the field, then give a dynamic body a positive Mass or set Mass Mode to auto.

Details

The node is drawn but does not take part in physics.

Example: PHY003.aescene

Scene2 nodes
Crate
Transform
position[0, 0]rotation0scale[1, 1]
Rigid Body 2D
typeenumdynamicmassModeenumoverridemassfloat0
Ground
Transform
position[0, 3]rotation0scale[1, 1]

PHY004error

A joint without two bodies

A Distance Joint 2D or Revolute Joint 2D connects the body on its node with the body on Target.

Fix. Put the joint on a node with a Rigid Body 2D and pick another node with a body in Target.

Details

One of them is missing, or Target points at the joint's own body, so the joint is not created.

Example: PHY004.aescene

Scene1 node
Pendulum
Transform
position[0, 0]rotation0scale[1, 1]

PHY005error

A physics body under a 3D parent

Physics 2D works on 2D nodes in a 2D hierarchy.

Fix. Move the body out of the 3D branch, or build that part of the scene in 2D.

Details

A body inside a 3D node has no 2D world transform to simulate, so it is skipped.

Example: PHY005.aescene

Scene2 nodes
Stage3D
Transform
position[0, 0]rotation0scale[1, 1]
Crate
Transform
position[0, 0]rotation0scale[1, 1]

PHY007warning

A moving body teleported from Update

A script changed the position of a dynamic or kinematic body in Update, outside the fixed step.

Fix. Move bodies in FixedUpdate, with forces, impulses or a velocity, or with MoveTo on a kinematic body; set the position directly only to teleport on purpose.

Details

The change is applied at the next physics step as a teleport: no velocity, no collisions on the way. The example script does this every frame.

Example: PHY007.aescene

Scene2 nodes
Crate
Transform
position[0, 0]rotation0scale[1, 1]
Ground
Transform
position[0, 3]rotation0scale[1, 1]
package demo

// Teleporter sets its own position in Update, which physics reports as PHY007.
script Teleporter {
    func Update(dt float) {
        node.SetPosition(Vec2{0, -2})
    }
}

PRT001error

Invalid emitter configuration

A field in the emitter has a non-finite value, an invalid range or an unsupported setting.

Fix. Correct the named field and keep both Lifetime bounds positive and ordered.

Example: PRT001.aescene

Scene1 node

PRT002warning

Missing or incompatible particle resource

A particle asset reference cannot be resolved or its material does not support unlit sprites.

Fix. Restore the referenced texture, or assign an unlit sprite-domain material.

Example: PRT002.aescene

Scene1 node
Effect
Particle System 2D
spriteTextureasset("aace00000000000000000000deadbeef")

During Play

ANM005warning

The target node of a track is missing

The node path of a track does not lead to a node under the player, so the track is off.

Fix. Rename the node back, or change the track's path in the clip.

Details

A renamed or deleted child is the usual cause.

It appears during Play, when the clip is bound to the scene; it is checked again when the hierarchy changes.

ANM007warning

Gameplay content in an unscaled player

An Animation Player with Time Domain unscaled plays a clip with authority=simulation tracks or gameplay events.

Fix. Use Time Domain game for animation that changes the game, or make the tracks presentation and the events presentation.

Details

Unscaled players run in real time and are not part of the game state, so those tracks are off and the events arrive as presentation events.

ANM008warning

A clip reimported with other tracks

A clip was imported again during Play and its tracks changed: there are more or fewer, or a track has another node, property or kind.

Fix. Play the clip again, or restart Play.

Details

The players of that clip stop, because their place in the old clip means nothing in the new one. A clip with the same tracks and other keys or another length keeps playing from the same point.

ANM009warning

Root motion has nowhere to go

A clip has a root track, a transform.position track with root=true, but nothing can move the node with it.

Fix. Add Motion 2D to the node, set Root Motion to toTransform, or play the clip with an Animator.

Details

An Animator with Root Motion toMotion moves its node through Motion 2D, and this node has none; with Root Fallback the node moves its transform instead, without it the motion is dropped. An Animation Player never plays root motion: the root track is off.

It appears during Play, on the first step that has root motion.

PFX002error

Multiple post-process owners for one output

Several active cameras have enabled Post Process components on the same logical output, so their stacks are bypassed.

Fix. Keep Post Process enabled on one camera per output, including cameras whose stacks are empty.

PHY006warning

A body reparented during Play

Moving a node with a Rigid Body 2D under another parent while the game runs recreates the body at the same world position and velocity.

Fix. Reparent before Play, or move the body with a joint or a script instead of changing its parent.

Details

Contacts start over, and joints on the body are rebuilt. This is a warning: the game keeps running.

It appears when the scene is edited during Play, for example by dragging the node in the Hierarchy, so no scene file shows it.