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:
All messages must have a
D is not a function.
Check analysis.json - this can indicate you referenced an output that doesn't exist or used an incorrect operation.
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.