TrenchBroom
TrenchBroom copied to clipboard
GameConfig.cfg with a single invalid fileformat causes nondescriptive error "Unknown error while saving .map" when saving
System Information
Version 2023.1 on Windows 10
Expected Behavior
trenchbroom provides a more verbose error that the selected fileFormat is invalid. ideally, it does this when you create a new map instead of at the time the error currently appears (when saving)
Steps to Reproduce
- Add the above as a new game to trenchbroom (unzipping into %appdata%/TrenchBroom/games on windows)
- Create a new map for that game (pogo3D). The only option for FileFormat should be "Pogo3d" and it should be grayed out
- save document anywhere
Error
Trenchbroom spawns an error that says "Unknown error while saving (map name)". there is no context. nothing appears in the logs. the file is successfully written and contains only this:
// Game: Pogo3D
// Format: Unknown
TrenchBroom has no idea what a Pogo3D map format is.
"version" : 6,
"name" : "Pogo3D",
"icon": "Icon.png",
"fileformats": [
{ "format": "Pogo3D" }
],
Supported map formats :
{ "format": "Quake2" } { "format": "Quake2 (Valve)"} { "format": "Valve" } { "format": "Standard" } { "format": "Quake3 (Valve)" } { "format": "Quake3 (legacy)" } { "format": "Daikatana" }
yeah. I know pogo3D is not a real map format. it was just a mistake when creating the config. I think trenchbroom should be smart enough to warn the user they have made this mistake though