Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal NMLC error with GRF using a switch parameter #197

Closed
2TallTyler opened this issue Mar 26, 2021 · 4 comments
Closed

Internal NMLC error with GRF using a switch parameter #197

2TallTyler opened this issue Mar 26, 2021 · 4 comments

Comments

@2TallTyler
Copy link
Member

@2TallTyler 2TallTyler commented Mar 26, 2021

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.

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.

@LordAro
Copy link
Member

@LordAro LordAro commented Mar 26, 2021

Can confirm.

store_tmp = VarAction2StoreCallParam(layout.register_map[parent_action.feature][i])

At that point, layout.register_map only contains key/feature 20

Not that I've any idea where 7 or 20 came from...

@Eddi-z
Copy link
Contributor

@Eddi-z Eddi-z commented Mar 26, 2021

Feature 7 is Houses and feature 14 (20 dec) is towns

so NMLC gets confused that the "parent" of a house is a town

@FLHerne
Copy link
Contributor

@FLHerne FLHerne commented Mar 26, 2021

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

@FLHerne FLHerne closed this as completed Mar 26, 2021
@2TallTyler
Copy link
Member Author

@2TallTyler 2TallTyler commented Mar 26, 2021

Thanks! I'll update my NMLC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants