Semiautomatic Renew

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

Post by tecxx »

i have trouble patching this into the svn.
error in ship_gui.c:

Code: Select all

	const byte *b = _ship_refit_types[_opt.landscape];
c:\C++\OpenTTD\ship_gui.c(607) : error C2143: syntax error : missing ';' before 'const'
c:\C++\OpenTTD\ship_gui.c(609) : error C2065: 'b' : undeclared identifier
c:\C++\OpenTTD\ship_gui.c(609) : error C2100: illegal indirection
c:\C++\OpenTTD\ship_gui.c(610) : error C2100: illegal indirection
ChrisHuebsch
Engineer
Engineer
Posts: 75
Joined: 10 Jun 2004 12:46

Post by ChrisHuebsch »

tecxx wrote:i have trouble patching this into the svn.
error in ship_gui.c:

Code: Select all

	const byte *b = _ship_refit_types[_opt.landscape];
c:\C++\OpenTTD\ship_gui.c(607) : error C2143: syntax error : missing ';' before 'const'
ouch. you are right.

it would be wise to move this line 6 lines upwards in the source:

Code: Select all

     int sel = 0;
     int in_refitables = 0;
     const byte *b = _ship_refit_types[_opt.landscape];

     DeleteWindowById(WC_VEHICLE_REPLACE, v->index);

     w = AllocateWindowDesc(&_ship_replace_desc);
does it work that way? Shall I fix it on sf.net?


Chris
tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

Post by tecxx »

ah, stupid me, i always forget that C only allows variable declaration at the start of a function (i'm used to c++ style ;=)

yes it compiled, but, just for your information, i had to manually edit english.txt and add the new text strings, the patch function of tortoise-svn reported an error that "there is no url for english.txt" or something
ChrisHuebsch
Engineer
Engineer
Posts: 75
Joined: 10 Jun 2004 12:46

Post by ChrisHuebsch »

tecxx wrote:ah, stupid me, i always forget that C only allows variable declaration at the start of a function (i'm used to c++ style ;=)
I didn't find it too, because my gcc compiled it without complaints.
tecxx wrote: yes it compiled, but, just for your information, i had to manually edit english.txt and add the new text strings, the patch function of tortoise-svn reported an error that "there is no url for english.txt" or something
My console svn said it too. "lang/english.txt not found for patching. What shall I patch?" (me) "lang/english.txt" (svn) "done".

Strange.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 13 guests