Error reference

Errors you may encounter and how to fix them

You may see a red error message pop up when running a simulation - here's some of the most common, and how to fix them.



ReferenceError: behavior is not defined or Can’t find variable: behavior

Every HASH behavior file must have a function signature with a function named behavior().

If it is not properly defined, you'll see this error.

ERROR running simulation: [error] did not match any variant of untagged enum OutboundMessage

All messages must have a to and type field this error indicates the type is missing.

D is not a function.

Check analysis.json - this can indicate you referenced an output that doesn't exist or used an incorrect operation.

Agent "[agent id]" doesn't have a position.

Many operations on agents require a physical location on the x,y plane for example searching for neighbors. This error will be thrown if there is no position defined for the agent.

We're expanding this list with more errors, explanations, and fixes. If you encounter an error that is unclear, let us know.