NML: Usage of nearest_house_matching_criterion

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
StoneyTT
Engineer
Engineer
Posts: 23
Joined: 29 Apr 2013 16:30
Location: Germany

NML: Usage of nearest_house_matching_criterion

Post by StoneyTT »

I'm trying to use the function nearest_house_matching_criterion with the criterion SEARCH_HOUSE_BY_ID (like 'nearest_house_matching_criterion(10, SEARCH_HOUSE_BY_ID)'), but the compiler says: Unrecognized identifier 'SEARCH_HOUSE_BY_ID' encountered.
What am I doing wrong? I'm using the NML version r2083.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4765
Joined: 09 Sep 2007 05:03
Location: home

Re: NML: Usage of nearest_house_matching_criterion

Post by Alberth »

Code: Select all

nml/global_constants.py
490:    'SEARCH_HOUSE_BY_TYPE'               : 0,
491:    'SEARCH_HOUSE_BY_CLASS'              : 1,
492:    'SEARCH_HOUSE_BY_GRFID'              : 2,
seems to be the only "SEARCH_HOUSE" forms that NML understands. Where did you find ..._BY_ID ?
StoneyTT
Engineer
Engineer
Posts: 23
Joined: 29 Apr 2013 16:30
Location: Germany

Re: NML: Usage of nearest_house_matching_criterion

Post by StoneyTT »

Alberth wrote:Where did you find ..._BY_ID ?
In the description in the wiki: http://newgrf-specs.tt-wiki.net/wiki/NM ... _variables

I tried SEARCH_HOUSE_BY_TYPE now and it seems that it does what I want. Thanks!
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 17 guests