Psych Engine Logo
T-Bar Engine - Documentation

List of Common HScript errors

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:


  • Invalid class: [Class Path] was not found.

    - 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.

  • Invalid access to field [Field name]

    - 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.

  • Invalid number of parameters. Got [Num], required [Num] for function '[Function]'

    - Happens if an hscript function is called with less arguments set than what the function actually requires.

  • Null Function Pointer

    - 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.