MiceOnABeam's error reporting system makes it easy to find and correct LSL syntax and variable/function declaration errors directly from within MiceOnABeam and before exporting the generated code to your virtual world.
While LSL errors are flagged inline whenever a Properties Editor is saved, the entire model is re-checked upon generating the LSL code and a summary of outstanding LSL errors are listed in the Code Generation Errors dialog.
From here you can select an error and go to the modeling component of interest. As well you can open up the corresponding Properties Editor which will display the error message right at the point in the LSL code where the error was found. You can then fix the error and quickly regenerate the code by selecting the Refresh button on the Code Generation Errors dialog to update the error list.
The Code Generation Errors list flags non-critical Warnings separate from Errors. Warnings are generated for local variables that are declared but never used, or used but not previously initialized. As well, obvious cases of unreachable code are flagged here. You can disable the detection and displaying of warnings by de-selecting Show Warnings in the Code Generation panel of the Options menu.
In addition the Code Generation Errors list can be sorted by any column by clicking the column header. Clicking the same column header again will reverse the sort.
When generating the LSL code for a model, various checks for incomplete models are done and warnings are issued for these within the Code Generation Errors List.
In particular checks are done for:
Missing incoming transition for a State, Final State, Shallow/Deep History Point or Terminate Point;
Missing incoming or outgoing transition for a Choice Point or Junction Point;
Originating transition with an undefined event;
Missing Initial Transition for a Composite State;
As with all warnings, you can disable their detection and display by de-selecting Show Warnings in the Code Generation panel of the Options menu.
Opens up the Properties Editor for the modeling component associated with the selected error.
Opens up the State Editor for the modeling component associated with the selected error.
- If errors are found, the generated code is not displayed nor copied to the system clipboard. If you wish to still fully generate the code in the presence of errors enable the option Generate Code on Errors in the Code Generation panel of the Options dialog.
The location and size of the Code Generation Errors window will be remembered for the current MiceOnABeam session only.