Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: nin10doadict on July 24, 2018, 08:20:08 PM

Title: [Fixed][Graphics set tool] Cannot load style that has no objects or no terrain
Post by: nin10doadict on July 24, 2018, 08:20:08 PM
Steps to reproduce:
Create a new style. Add some terrain pieces, but no objects. Save the style and then close the set tool.
Upon reopening the set tool and trying to load this style, you will be greeted with an error message:

"Klopt niet: #lack is not a valid value for Int32. Try to continue working on the style? Selecting 'no' will quit the style editor."

Selecting no quits as advertised. Selecting yes allows you to continue, but the style fails to load and the terrain pieces you inserted do not appear and cannot be modified. Any other changes that you have made to the style also fail to load.

The same situation occurs if you insert objects but no terrain. The level editor is able to load the style with no issues, even if it lacks terrain or objects. Any objects (or terrain) that have been inserted load and function properly in the level editor.
Title: Re: [Graphics set tool] Cannot load style that has no objects or no terrain
Post by: Nepster on July 25, 2018, 05:08:18 PM
Thanks a lot. The problem is the C# method to convert internal colors to their hex RGB representation. For 99% of all colors it worked fine, but for some of them it just returns the color's name!!! :devil::devil::devil: So the "#lack" you see in the error message is actually a mangled "Black"! And of course the code failed to convert it back to an actual color.
I fixed this and added a way to load styes that have been saved with that stupid color-to-hex method.
Title: Re: [Graphics set tool] Cannot load style that has no objects or no terrain
Post by: Simon on July 25, 2018, 05:25:39 PM
Beautiful. :8(): Thanks for the entertainment. Certainly, some program out there relies on this mess, and now they can't change the spec.

-- Simon