string errors when compiling 0.2.x

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

string errors when compiling 0.2.x

Post by Korenn »

what has changed in 0.2.x in respect to the string table stuff?

ottd compiled perfectly ok with 0.1.x and I updated the source to 0.2 and I get 200+ errors saying the STR_XXXXXX_XXXXX stuff is undeclared.

I obviously need to include some new file but what is it?

[edit] I ran strgen and I copied the .lng file so that's not it.
Vurlix
OpenTTD Developer
OpenTTD Developer
Posts: 122
Joined: 07 Mar 2004 01:54

Post by Vurlix »

strgen, when invoked with no parameters, generates table/strings.h which is the file you're missing and is also the reason for all those errors.
http://sf.net/projects/openttd/
Post all your patches and feature requests here.
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

ah yes I found the strings.h, but it was already included in the project.

all the strings in strings.h have the STR_number_XXXXXXX format, and those compile fine. (the strings.h was already in the 0.1.x too, and that compiles!)

I get errors like:

Code: Select all

D:\code\openttd\engine.c(45) : error C2065: 'STR_SV_EMPTY' : undeclared identifier
D:\code\openttd\players.c(278) : error C2065: 'STR_SV_UNNAMED' : undeclared identifier
D:\code\openttd\strings.c(66) : error C2065: 'STR_CURR_POUNDS' : undeclared identifier
those are not in strings.h
Vurlix
OpenTTD Developer
OpenTTD Developer
Posts: 122
Joined: 07 Mar 2004 01:54

Post by Vurlix »

They are in mine, so you probably have an outdated english.txt.
Get the latest and run strgen again to get the new strings.h.
http://sf.net/projects/openttd/
Post all your patches and feature requests here.
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

ah that was it!

I had apparently forgotten to copy the new language .txt files :oops:

thanks :D
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 2 guests