Editor
When creating or editing homebrew items, fields that accept Dragonscript will have an input area similar to the one shown below.
The main section of this area is where you can type. Directly beneath that, the text "Supports Dragonscript" identifies this as a space which accepts Dragonscript while also providing a quick link to this documentation. Finally, the bottom-right corner shows the position of the cursor when typing which can be helpful when locating errors.
When writing Dragonscript the input area will continuously parse and execute your statements to ensure there are no issues. If any issues are found, they will be reported immediately. There are two types of issues you may encounter: parsing errors and execution warnings.
Parsing Errors
Parsing errors happen when there is incorrect syntax among Dragonscript statements. Examples include missing ;
, invalid or misspelt Properties or incomplete statements. In such a case, you will see errors like the one shown below.
In this case, the word "insight" has been misspelt and the error tells us that one of the actual Bonus Types was expected.
Parsing errors will include the Line and Column number where the error was encountered.
Execution Warnings
Execution warnings are reported when the Dragonscript code is syntactically correct, but the resulting Dragonscript may not have the intended effect. The example below shows the case of trying to add a bonus to a property for which that statememt doesn't make sense.