comment chars in INI files

Discussions about Servers
User avatar
Barbie
Godlike
Posts: 2956
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

comment chars in INI files

Post by Barbie »

I expect that lines beginning with a token that is not known as a variable, are ignored when read from a INI file? So that I can for example use '#' or ';' in the beginning of a line to indicate (for me) that this line should be ignored?
"If Origin not in center it be not in center." --Buggie
Buggie
Godlike
Posts: 3230
Joined: Sat Mar 21, 2020 5:32 am

Re: comment chars in INI files

Post by Buggie »

Comment symbol for ini files is ";".
However UT not keep comments.
So if you want preserve comments in files which read and store, then make unknown property.
For example
___my_comment=text of comment
Such lines must be in some section.
User avatar
papercoffee
Godlike
Posts: 10531
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: comment chars in INI files

Post by papercoffee »

isn't "//" at the beginning usually used for comments?
User avatar
Barbie
Godlike
Posts: 2956
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: comment chars in INI files

Post by Barbie »

papercoffee wrote: Wed Nov 27, 2024 3:59 pm isn't "//" at the beginning usually used for comments?
In some programming languages. Examples.

https://en.wikipedia.org/wiki/INI_file#Comments wrote:A line with contiguous trailing whitespace followed by a semicolon (;, ASCII 0x3E) indicates a comment. Some INI dialects furthermore allow use of the number sign (#, ASCII 0x23) to denote a comment, mirroring Unix shell comments
And I could have read this before posting... :loool:

The reason for my question
The entry with utmaster.epicgames.com is commented out:
UnrealTournament.ini wrote:[Engine.GameEngine]
UseNetMovingBrushTracker=true
CacheSizeMegs=4
UseSound=True
ServerActors=IpDrv.UdpBeacon
ServerActors=XServerQuery.XServerQuery
;ServerActors=XServerQuery.XServerUplink MasterServerAddress=unreal.epicgames.com MasterServerPort=27900
;ServerActors=XServerQuery.XServerUplink MasterServerAddress=utmaster.epicgames.com MasterServerPort=27900
ServerActors=XServerQuery.XServerUplink MasterServerAddress=master.333networks.com MasterServerPort=27900
ServerActors=XServerQuery.XServerUplink MasterServerAddress=master.oldunreal.com MasterServerPort=27900
but log file says it is used:
ucc.init.sh.log wrote:[12:56:14] Port 7778 successfully bound.
Resolving utmaster.epicgames.com...
(5x repeated)

AInternetLink Resolve failed: Can't find host utmaster.epicgames.com (HOST_NOT_FOUND)
[12:56:16] Failed to resolve master server address, aborting.
(6x repeated)
"If Origin not in center it be not in center." --Buggie
User avatar
papercoffee
Godlike
Posts: 10531
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: comment chars in INI files

Post by papercoffee »

Barbie wrote: Wed Nov 27, 2024 4:25 pm
papercoffee wrote: Wed Nov 27, 2024 3:59 pm isn't "//" at the beginning usually used for comments?
In some programming languages. Examples.
Oh ok ...because I have seen this in some U-scripts and thought that would be the way to comment.
:tu: