SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-30-10, 11:59 AM   #1
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default How to write '=' via *_menu.txt?

Hi,

I tried to add a string containing the equal sign (=) to my *_menu.txt, but it did not show up I tried to enclose it in several ways, but nothing helped. Does anyone know how this can be done? I guess a similar problem arises if you want to use the semi-colon ;

Cheers, LGN1
LGN1 is offline   Reply With Quote
Old 08-31-10, 02:51 AM   #2
JScones
Navy Seal
 
Join Date: Apr 2005
Posts: 5,501
Downloads: 19
Uploads: 0
Default

= ; [ ] are usually reserved characters in config files, with their behaviour determined by where they appear in the line, and how the application reading the file implements the config file format.

Some implementations allow escape sequences, so if you haven't already, try \= or \; and see if that works, for example:

9998=an interdependent\; statement
9999=something \= something else

If this doesn't work, then you may have to consider simply using other characters.

Notwithstanding this, I would strongly recommend not using = in config file values. It creates confusion and leads very easily to unintended consequences. For example, if object A equals object B you might want to present a string to the user. So you might add this line to your config file:

A=B=Something to say if true

You'll then spend your debugging cycle tearing your hair out wondering why the text won't appear, which will be simply because the application will see the key as A and the value as B=Something to say if true, not what you were expecting.
JScones is offline   Reply With Quote
Old 08-31-10, 06:46 AM   #3
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Thanks for the reply, JScones

I tried the \= before, but it did not work I also used your SH3Patrol Editor to see how it deals with the special characters. As in my case the line just does not show up in the log book.

Anyway, I have circumvented the problem already by avoiding the =

Thanks again for your reply.

Cheers, LGN1
LGN1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.