Internal NMLC error with GRF using a switch parameter
2TallTyler opened this issue · 4 comments
I am building a house set which heavily uses switches with parameters as functions. All have worked fine, except for calculating the town population using the parent scope and a parameter for the population required to construct the building. This returns an internal NMLC error.
I have attached a simple NML file which reproduces this error. Removing the parameter and changing the evaluation to a constant population >= 10
compiles fine.
error_grf.zip
I compiled my copy of NMLC late last fall, I believe around the end of November.
Can confirm.
Line 942 in 3251646
At that point, layout.register_map
only contains key/feature 20
Not that I've any idea where 7 or 20 came from...
Feature 7 is Houses and feature 14 (20 dec) is towns
so NMLC gets confused that the "parent" of a house is a town
@frosch123 fixed this in #175.
Specifically it works after commit cf57433 "Fix: register_map must be accessed with the feature of the action, not with the scope of the variables."
Thanks! I'll update my NMLC.