Check for OTTD version

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
PaulC
Director
Director
Posts: 616
Joined: 31 Jul 2006 12:40
Location: Lancs, England
Contact:

Check for OTTD version

Post by PaulC »

I'm using the following code (directly above the action 8 ) in a grf which is meant to be used with OTTD r23004 or higher:

Code: Select all

    1 * 9	 09 9D 04 \7= 01 00 00 00 02
    2 * 12	 0B 03 7F 02 "OpenTTD" 00
    3 * 9	 09 9D 04 \7= 00 00 00 00 00
    4 * 9	 09 A1 04 \7> DB 59 00 12 02
    5 * 19	 0B 03 7F 06 "1.2.0 (r23004)" 00
    6 * 9	 09 A1 04 \7< DC 59 00 12 00
The intention is to display an error message and disable the grf if used with TTDP or an old version of OTTD, but although the first message works fine I don't get the second message when used in OTTD 1.1.4-RC1. I can't see what I'm doing wrong here, so any help would be appreciated.

[EDIT] Never mind, with a bit of trial and error I got this working by removing line 6, though I don't really understand why that would cause a problem.

Not entirely sure why this got moved either. Meh.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 23 guests