Stupid questions about patching

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Probably the most stupid question about patching (widgets)

Post by pavel1269 »

Kogut wrote:

Code: Select all

SDT_VAR( ... ),
On first look, I miss one number ....

Code: Select all

... <flags>, <guiflags>, <init val>, <min>, <max>, <step> ...
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

Code: Select all

SDT_VAR(GameSettings, economy.town_demanded_food_divisor, SLE_UINT8,  0, MS, 1,    10000, 1, 1,STR_CONFIG_SETTING_TOWN_DEMANDED_FOOD_DIVISOR, NULL),

Code: Select all

<settings group> = GameSettings
<varname> = economy.town_demanded_food_divisor
<vardef> = SLE_UINT8
<savewhereflags> = 0 
<gui flags> = MS
<initial value> = 1
<max value> = 10000 
<min value> = 1
<step> = 1
<display string> = STR_CONFIG_SETTING_TOWN_DEMANDED_FOOD_DIVISOR
<onchange callback proc> = NULL
in result:

Code: Select all

3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(378) : warning C4003: not enough actual parameters for macro 'SDT_VAR'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(378) : error C2143: syntax error : missing '}' before ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(378) : error C2440: 'initializing' : cannot convert from 'SaveLoadTypes' to 'const void *'
3>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(378) : error C2440: 'initializing' : cannot convert from 'void *' to 'int32'
3>        There is no context in which this conversion is possible
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(380) : error C2059: syntax error : '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(380) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(380) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(380) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(381) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(381) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(381) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(382) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(382) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(382) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(383) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(383) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(383) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(384) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(384) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(384) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(385) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(385) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(385) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(386) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(386) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(386) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(387) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(387) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(387) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(389) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(389) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(389) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(390) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(390) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(390) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(391) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(391) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(391) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(392) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(392) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(392) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(394) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(394) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(394) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(395) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(395) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(395) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(396) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(396) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(396) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(398) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(398) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(398) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(399) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(399) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(399) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(400) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(400) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(400) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(401) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(401) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(401) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(402) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(402) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(402) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(403) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(403) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(403) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(404) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(404) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(404) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(405) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(405) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(405) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(406) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(406) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(406) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(407) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(407) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(407) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(408) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(408) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(408) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(409) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(409) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(409) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(410) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(410) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(410) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(411) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(411) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(411) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(412) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(412) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(412) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(413) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(413) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(413) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(414) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(414) : error C2447: '{' : missing function header (old-style formal list?)
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(414) : error C2059: syntax error : ','
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(415) : error C2143: syntax error : missing ';' before '{'
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(415) : fatal error C1003: error count exceeds 100; stopping compilation
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: The most stupid question about patching (\src\table\setting)

Post by pavel1269 »

Hmm. I don't see any problem with this line of code, except use of STD_VAR, which is not causing the error (I think).

Can you create a patch file, with just this one file to see, any other modifications? You know, by accident removed some parentheses, comma or something.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

Thank for your answer
Attachments
path.patch
(7.22 KiB) Downloaded 54 times
with project.patch
(10.12 KiB) Downloaded 59 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: The most stupid question about patching (\src\table\setting)

Post by pavel1269 »

Oh... Have you actually modified the code as I said? I have not noticed the warning saying you the problem, because I see very bad those wide lines. You are missing there the <interval> number. Also, you have there as a <guiflag> SL_MAX_VERSION, so you mixed SDT_VAR and SDT_CONDVAR. You can see everywhere around use of those two :wink:

To compile replace

Code: Select all

SDT_VAR(GameSettings, economy.town_demanded_food_divisor,               SLE_UINT8,                     0, SL_MAX_VERSION, 1,    10000, 1, STR_CONFIG_SETTING_TOWN_DEMANDED_FOOD_DIVISOR,         NULL),
With

Code: Select all

SDT_VAR(GameSettings, economy.town_demanded_food_divisor,               SLE_UINT8,                     0, SL_MAX_VERSION, 1,    10000, 1, 0, STR_CONFIG_SETTING_TOWN_DEMANDED_FOOD_DIVISOR,         NULL),
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: The most stupid question about patching (\src\table\setting)

Post by Eddi »

only the first error is usually relevant, the the other ones are only following from the first error, you don't need to post every single one of them...
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

Code: Select all

SDT_VAR(GameSettings, economy.town_demanded_food_divisor, SLE_UINT8,  0, SL_MAX_VERSION, 1,    10000, 1, 0,STR_CONFIG_SETTING_TOWN_DEMANDED_FOOD_DIVISOR, NULL),
And the same error
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: The most stupid question about patching (\src\table\setting)

Post by Alberth »

Randomly trying suggestions from others is not going to get you anywhere.
With programming, it *helps* *a* *lot* if you have at least a basic understanding of what you are doing, and can resolve simple problems like for example syntax errors, by yourself.

To speed up your development, I'd like to suggest you take the time to read a book about C/C++ programming, and do a few simpler excercises first, to make you familiar with the syntax of the language, and the basic development process.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

Alberth wrote:With programming, it *helps* *a* *lot* if you have at least a basic understanding of what you are doing, and can resolve simple problems like for example syntax errors, by yourself.
The problem is that wiki page have incorrect information about parameters that should be inserted. In case of syntax problem in my code I would like to get hint what is wrong, but according to

Code: Select all

3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(378) : warning C4003: not enough actual parameters for macro 'SDT_VAR'
Problem is that information about 'SDT_VAR' on wiki are outdated, and macro is failing to create correct code.
Alberth wrote:Randomly trying suggestions from others is not going to get you anywhere.
I assume that replies in the topic are from people with basic understanding of what is happening in settings.h.
To speed up your development, I'd like to suggest you take the time to read a book about C/C++ programming, and do a few simpler excercises first, to make you familiar with the syntax of the language, and the basic development process.
It is done.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

Whatmore example from wiki is failing with the same error message

Code: Select all

SDT_VAR(GameSettings, my_var_opt,SLE_UINT8,S, 0, 4, 1, 20, STR_CONFIG_SETTING_MY_VAR_OPT,NULL),
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: The most stupid question about patching (\src\table\setting)

Post by Alberth »

You may have noticed it already, but the wiki is outdated. In fact, it is so by definition.

The reason for the wiki being out of date, is that the wiki is not the authorative source of information. The actual source code used at the moment is the one and only authorative source.
For large parts of the source code, the comments in the code may also have some meaning to help you understand what is happening. However, I have seen places where the code and the comments contradict each other, so they may be wrong.

In other words, you should read the source code rather than the wiki to understand what to enter in the code, and set the parameters according to what the code says.

As for the actual error, a syntax error usually means that a seperator (a comma or a semi colon) is missing at the line, or the line above it, or that the number of parameters is not correct.

Unfortunately, my understanding of settings.h is so basic that I cannot tell you the correct magic line. I'd have to study the code as well first.


Edit: fixed typo
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

OK, I see that I should try to convert one of existing settings to new setting.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: The most stupid question about patching (\src\table\setting)

Post by Michi_cc »

The source code says:

Code: Select all

#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, proc) ...stuff...
Comparing leads to the conclusion that the example misses one of the parameters. It's not exactly clear which one, but from the values I'd guess interval is the missing one.

Your initial patch has a much bigger problem though, which is that you very likely don't want a no-save (S) setting, which means you have to use SDT_CONDVAR to not break savegames (and bump the savegame version).

-- Michael Lutz
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Probably the most stupid question about compiling

Post by petert »

Kogut wrote:1) Yes I know, but why not name that folder "openttd_source" or sth similar?
Because ottdsrc is the same thing.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\setting)

Post by Kogut »

Thanks for help, I finally completed my little patch!
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (33.44 KiB) Viewed 2219 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\sett

Post by Kogut »

Where I can find information what does it mean? [result of compiling of patched openttd]
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (18.08 KiB) Viewed 2129 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: The most stupid question about patching (\src\table\sett

Post by Alberth »

Kogut wrote:Where I can find information what does it mean? [result of compiling of patched openttd]
At line 53 of src/core/pool_type.hpp :)

Seriously, you should build a debug version of openttd, and run the program in the debugger. When the error occurs, you get a stack-dump of function-calls, that show you how that line was reached. That usually gives very good hints where to look.

Since "index < this->first_unused" fails, you are trying to do "index >= this->first_unused". That sounds like you trying to get an entry from a pool that is not used.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: The most stupid question about patching (\src\table\sett

Post by Kogut »

Thanks!

Is it possible to stop generation of all that language files? It is really impresive that there are so many translations, but it takes time to generate...
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Stupid questions about patching

Post by Kogut »

I discovered problem - my patch is unable to load savegames (except that generated with patched openttd) and crashed on welcome screen...
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Stupid questions about patching

Post by Kogut »

One more (I am using tortoiseSVN)
- I applied patchpack to trunk
- I patched patch - how to create diff from patchpack (I want to have diff only with my modifications, not whole patchpack + my modifications)?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests