Closed Humberd closed 6 years ago
@Initiate
has a priority setting that lets you control the order in which these methods are invoked. Tweaking this value might allow you to invoke your method after LmlParser
is injected.
That said, DTD generation is basically dev-only code. "If it works, it works." You only need to do that when you modify the parser, e.g. you add new tags or macros - I don't think I'd even include it in the regular application on @Initiate
, as it slows down its startup. Consider using a separate main
that generates DTDs or convert your method to a LML action and add it as a button that you can click after the game is fully initiated.
How to save a dtd file inside
@Initiate
configuraiton method?When I did a tutorial for LML it was pretty easy:
But when I do this:
I get a NullPointerException here:
Workaround As a workaround I copied the whole method and supplied it with a proper lmlParser
Is there a better way to achieve this result?