Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty line in a text file enum produces unexpected behavior #1135

Open
Nifflas opened this issue Oct 4, 2024 · 1 comment
Open

Empty line in a text file enum produces unexpected behavior #1135

Nifflas opened this issue Oct 4, 2024 · 1 comment

Comments

@Nifflas
Copy link

Nifflas commented Oct 4, 2024

Since I use C#'s StringWriter.WriteLine to produce my Enum definitions for LDtk, they end up having an empty last line.

LDtk does not support this, and end up having an empty enum last just called "Enum" with no values. No biggie, I guess I'll have to get rid of the last new line in the file.

But when I produced an enum definition file without that empty last line, LDtk would crash on attempting to open the ldtk file. I had to put the empty line back in, open the ldtk file, remove the enum reference entirely, close LDtk, remove the unintended new line, then finally import it again.

@Nifflas
Copy link
Author

Nifflas commented Oct 5, 2024

I need to make an addition. With the empty line gone, my last enum entry in the file always get two identical entries in LDtk, even though I only defined it once. I'm attaching the enum file.

Groove Puppy Enums.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant