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

A named parameter cannot be used for a house ID #300

Open
zephyris opened this issue Jul 31, 2023 · 1 comment
Open

A named parameter cannot be used for a house ID #300

zephyris opened this issue Jul 31, 2023 · 1 comment

Comments

@zephyris
Copy link
Contributor

A named parameter cannot be used for a house ID, instead throwing a Unrecognised identifier for the parameter name, for example:

house_id_1=5;
item(FEAT_HOUSES, item_house_1, house_id_1) {
    ...
}

Gives Unrecognised identifier for house_id_1. This seems like a bug:

"in theory it's supposed to work (https://github.com/OpenTTD/nml/blob/master/nml/ast/item.py#L55 looks for named params via https://github.com/OpenTTD/nml/blob/master/nml/global_constants.py#L1415), so it looks like a bug (but a hard to fix one I think"

"I guess it's similar to #299 check happens at parsing but the registration of house_id_1 is during preprocess step"

@glx22
Copy link
Contributor

glx22 commented Aug 4, 2023

A possible solution/workaround could be #302

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

2 participants