Page 1 of 1

ModSettingsData.cs FormattedName(string) can't handle empty strings

Posted: Thu Jul 28, 2022 2:46 pm
by DunnyOfPenwick
...throws an InvalidOperationException if the value is an empty literal "".
<edit> Also, literals containing just spaces " " due to trimming.

Re: ModSettingsData.cs FormattedName(string) can't handle empty strings

Posted: Mon Aug 01, 2022 2:10 am
by Interkarma
ModSettingsData.FormattedName() is used to generate a name for a key. This should never be null or empty. It's reasonable that it would throw an exception of one kind or another.

What are you trying to accomplish by using an empty string here?

Re: ModSettingsData.cs FormattedName(string) can't handle empty strings

Posted: Mon Aug 01, 2022 1:52 pm
by DunnyOfPenwick
The text for my mod settings labels is being pulled from textdatabase.txt.

I am attempting to use several empty section titles to add padding to the bottom of the displayed column.

<edit>I can work around this just by using a dot or something, you can ignore this 'bug report'.