On first look, I miss one number ....Kogut wrote:Code: Select all
SDT_VAR( ... ),
Code: Select all
... <flags>, <guiflags>, <init val>, <min>, <max>, <step> ...
Moderator: OpenTTD Developers
On first look, I miss one number ....Kogut wrote:Code: Select all
SDT_VAR( ... ),
Code: Select all
... <flags>, <guiflags>, <init val>, <min>, <max>, <step> ...
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
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
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),
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),
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),
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 toAlberth 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.
Code: Select all
3>c:\openttd_folder_kompilacyjny\openttdnewfolder\src\table\settings.h(378) : warning C4003: not enough actual parameters for macro 'SDT_VAR'
I assume that replies in the topic are from people with basic understanding of what is happening in settings.h.Alberth wrote:Randomly trying suggestions from others is not going to get you anywhere.
It is done.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.
Code: Select all
SDT_VAR(GameSettings, my_var_opt,SLE_UINT8,S, 0, 4, 1, 20, STR_CONFIG_SETTING_MY_VAR_OPT,NULL),
Code: Select all
#define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, proc) ...stuff...
Because ottdsrc is the same thing.Kogut wrote:1) Yes I know, but why not name that folder "openttd_source" or sth similar?
At line 53 of src/core/pool_type.hppKogut wrote:Where I can find information what does it mean? [result of compiling of patched openttd]
Users browsing this forum: No registered users and 9 guests