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

Incorrect error when not providing a name property for waypoints. #311

Closed
zephyris opened this issue Oct 23, 2023 · 7 comments · Fixed by #305
Closed

Incorrect error when not providing a name property for waypoints. #311

zephyris opened this issue Oct 23, 2023 · 7 comments · Fixed by #305

Comments

@zephyris
Copy link
Contributor

I don't think waypoints, coded as a special class of station, can have a name.

If you code a station using the "WAYP" class for ITEM_STATIONS and provide a name property, then OpenTTD reports a NewGRF error: Unknown action0 property.

If you do not provide a name property, then nmlc reports the error nmlc ERROR: "ogfx2_stations.nml", line XXX: Property 'name' is not set. Item will be invalid., but makes a functional NewGRF that OpenTTD seems happy with.

Presumably just needs a special case for reporting the error? Or is this an OpenTTD bug?

@Brickblock1
Copy link
Contributor

I believe Openttd supports waypoint names so it is probably a nml bug

@PeterN
Copy link
Member

PeterN commented Oct 23, 2023

Waypoints can have names. Possibly your version of nmlc produces a NewGRF that is incompatble with 13.x?

@zephyris
Copy link
Contributor Author

zephyris commented Oct 23, 2023

@PeterN Yes, you're right, OpenTTD error does not happen for the latest nightly. I guess this can be closed...

But why? Seems like a basic thing, nmlc vs. OpenTTD version sensitivity seems weird to me...

@glx22
Copy link
Contributor

glx22 commented Oct 23, 2023

OpenTTD did OpenTTD/OpenTTD@bc7dfd7 in nightlies, which has been then added to nml in 0.7.4 (but there's a bug with a fix waiting for approval in #305)

@PeterN
Copy link
Member

PeterN commented Oct 24, 2023

TBH I assumed nmlc would try to keep compatibility with older versions were possible, e.g. by only using the new method if the local id was >= 255.

@zephyris
Copy link
Contributor Author

I've tested for sanity's sake, and it is indeed action0 and 0x1C 0x1D/name and class_name responsible for the OpenTTD error. I second @PeterN, for NewGRFs with few station names, retaining backwards compatibility is preferable...

@glx22
Copy link
Contributor

glx22 commented Oct 24, 2023

I can rewrite #305

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

Successfully merging a pull request may close this issue.

4 participants