Page 1 of 1

NFO query - date vehicle built (vars 49/C4)

Posted: 20 Dec 2008 19:31
by andythenorth
I have created some NFO code that changes vehicle livery depending on date vehicle is constructed.

The code works as expected, and makes use of (EDIT) variable C4 (year built, counted since 1920) in a variational action 2.

However, because OpenTTD can start games before 1920, I thought it might be better to use (EDIT) variable 49 (year built, counted since 0). However nfo-renum (v3.4.6) reports the following error:

Code: Select all

//!!Warning (86): Offset 4: Testing nonexistant variable 49.
For my current purpose, (EDIT) variable C4 will suffice entirely. However I wondered if this was a known issue?

Variable 49 listed here: http://wiki.ttdpatch.net/tiki-index.php ... n2Vehicles

cheers,

Andy

Re: NFO query - date vehicle built (props 49/C4)

Posted: 20 Dec 2008 20:06
by frosch
The variable is from "Wed 04 of Jun, 2008 [01:19]"
What is the release date of your nforenum?

So if it is the only warning, you can ignore it as you know better [1], you can check for a update of renum, and if none is available wait or politely ask for it.

However, when you do not need dates before 1920, you can just use variable C4. That would keep compatibility with TTDP.

[1] The rest of the action2 can be checked without knowing the variable.

Re: NFO query - date vehicle built (props 49/C4)

Posted: 20 Dec 2008 20:38
by andythenorth
frosch wrote:The variable is from "Wed 04 of Jun, 2008 [01:19]"
What is the release date of your nforenum?
11th Dec 2007.
Thanks Frosch, I'll see if there's a newer nfo-renum.

Re: NFO query - date vehicle built (props 49/C4)

Posted: 21 Dec 2008 00:46
by PhilSophus
andythenorth wrote: Thanks Frosch, I'll see if there's a newer nfo-renum.
I don't know if there is a release, but it seems to be in the svn ([url]svn://svn.ttdpatch.net/misc/nforenum[/url]) since August:

Code: Select all

r1980 | minime | 2008-08-06 03:37:07 +0200 (Mi, 06 Aug 2008) | 1 line

Added VA2 global variables 23 and 24, house variable 65, industry variable 46 and vehicle variable 49.

Re: NFO query - date vehicle built (props 49/C4)

Posted: 21 Dec 2008 04:12
by DaleStan
Except for 0.dat (still) breaking 0f8.dat (see the recent posts in the NFORenum thread) the data files on the NFORenum webpage should be up-to-date.

Also, neither "property C4" nor "property 49" are properties. Call things by their correct name, or don't call them anything at all. (Haven't I warned you about this before?)

Re: NFO query - date vehicle built (props 49/C4)

Posted: 21 Dec 2008 12:44
by andythenorth
DaleStan wrote: Also, neither "property C4" nor "property 49" are properties. Call things by their correct name, or don't call them anything at all. (Haven't I warned you about this before?)
I'll edit the posts above to fix that.

I had misunderstood a prior correction of my terminology in the context of an action 0 (in this case not by you DaleStan). My bad.