You are bound to find a bunch of different errors while working with haxe scripts or runHaxeCode. Here is a list of the most common errors:
- Happens when you try to import a class that doesn't exist. Try checking the spelling of the class.
Note: Dead Code Elimination (DCE) can also remove classes from the executable if it's not used, which could also be a reason why the class doesn't exist.
- Happens if a variable's field does not exist, or if the variable itself is null. This is also the case when trying to access a function.
- Happens if an hscript function is called with less arguments set than what the function actually requires.
- Happens when you try to access a non-existent function from a class or variable.
If you are confused on whether a function is available for a class, you can trace `Type.getClassFields(ExampleClass)` to return a list of available static fields and `Type.getInstanceFields(ExampleClass)` for available instance fields.