PDA

View Full Version : How to write '=' via *_menu.txt?


LGN1
08-30-10, 11:59 AM
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 ; :06:

Cheers, LGN1

JScones
08-31-10, 02:51 AM
= ; [ ] 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.

LGN1
08-31-10, 06:46 AM
Thanks for the reply, JScones :up:

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