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

Parsing Indentations with “Tab” working incorrectly #41

Closed
VexSpectre opened this Issue Jul 29, 2016 · 11 comments

Comments

Projects
None yet
3 participants
@VexSpectre
Copy link

VexSpectre commented Jul 29, 2016

This is my original code:

#Init Scoreboards
{"type":"impulse", "auto":false}
/scoreboard     objectives add sHambre      food
    {"type":"chain", "auto":true}
    /scoreboard objectives add sHp          health

When I compile it, I get this in the command blocks:
1: /scoreboard \tobjectives add sHambre\t\tfood
2: /scoreboard objectives add sHp \t\t\thealth

As you can see there are some \t that are corrupting the commands.
I’m using Sublime Text 3 to write the files and I haven’t created or modified the config file for smelt.

@GnaspGames GnaspGames added the bug label Jul 29, 2016

@GnaspGames GnaspGames added this to the Version 1.0.0 milestone Jul 29, 2016

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Jul 29, 2016

Thanks for the bug report. I suspect this has something to do with string escaping required to make sure that some of the JSON/NBT to properly parsed. I'll have a look at it.

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 3, 2016

I'm having trouble replicating this issue on Windows.

You're using Linux, is that correct?

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 3, 2016

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 3, 2016

Sorry, please excuse me. My editor was automatically replacing tabs with spaces.

@GnaspGames GnaspGames closed this in 481fdbd Aug 3, 2016

@VexSpectre

This comment has been minimized.

Copy link

VexSpectre commented Aug 7, 2016

As 0.9.1, the command:

#Scoreboards
>{"type":"impulse-chain"}
    //Hambre
    /scoreboard     objectives add sHambre      food

Compiles into:

untitled-1

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 7, 2016

@VexSpectre is this okay?

It was thought that the tab character should be replaced with 4 spaces since someone might use them in a say/tellraw for formatting.

In your case it probably means that the arguments to the scoreboard command are incorrect. Personally I don't feel you should be using tabs like this.

@SkaranYT

This comment has been minimized.

Copy link
Contributor

SkaranYT commented Aug 7, 2016

I agree with Gnasp here. If you write a command to your Minecraft Chat box/console you also get an error because of too many spaces

@VexSpectre

This comment has been minimized.

Copy link

VexSpectre commented Aug 7, 2016

@GnaspGames I use them for visual alignment with other commands on my sheet, it would be cool if the indentations outside of JSON blocks were deleted when parsed. I'm not using spaces, I can copy and paste the exact same command manually form Sublime / Notepad++ and have no errors, but thanks for the response and excuse me.

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 9, 2016

@VexSpectre I think when you copy/paste from a text editor directly into the command block then the tabs must be stripped out. I suppose that's a good point; you can't actually format with tabs directly inside Minecraft. Formatting (even inside a JSON block) would have to be done with spaces.

Okay, I'm happy to rethink this. Tabs should be replaced with 1 space, and if formatting text inside MC is a problem for some, we will recommend they use spaces and not tabs.

@GnaspGames GnaspGames reopened this Aug 9, 2016

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 16, 2016

This will be fixed when eb4e8bf is released.

@GnaspGames

This comment has been minimized.

Copy link
Owner

GnaspGames commented Aug 16, 2016

Closed with version 0.9.3

@GnaspGames GnaspGames closed this Aug 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment