mapeditor/tiled

Better error messages on file writing #3309

Yrds posted onGitHub

First of all I'd like to thank you for this piece of software. It's very useful for making tilemaps

Is your feature request related to a problem? Please describe.

First time using Tiled, I downloaded a project from an art designer that have layers named like "objects/doors" "objects/roofs". I tried to export these maps to .csv, and it's shows up a message "Can't open file for writing".

Digging out on Google I couldn't find a solution, and after some hours I finally understand why I can't save those layers, that's because the layers are named with slashes and probably a directory must exists to export theses layers.

Describe the solution you'd like

Error messages can be detailed like can't open file for writing: ${full_file_path}. That way it's easier to figure out more quickly on how to solve this problem.

Describe alternatives you've considered

I don't think blocking slashes from layer's name It's a good solution, tough can break existing projects layout and some people can use this feature as advantage for project organization.


Right, mentioning the file name in the error message is a good idea. Besides that, I guess we could automatically turn "/" into "_" in the CSV plugin when setting up the file names.

posted by bjorn about 3 years ago

I've added the file name to the error message. But also, you'll no longer see this error because the reserved characters are now automatically replaced by _. :-)

posted by bjorn about 3 years ago

Fund this Issue

$0.00
Funded

Pull requests