Problems with indents

I’m having trouble with indenting. The way I got into this is strange, but basically, I have installed a version of Choicescript IDE, forgetting that it is 1.0 v and when it started up there was a pop-up that asked to standardize the indents and I clicked yes. I realized after that and uninstalled it and resumed working with the version I had before.

But since then I have been getting those errors and my indenting looks…bad.

The error I’m getting is:

image

My code looks like this:

Example
      #You hate it, you hate the idea of fighting!
            Mother insist that this is merely a short road until you will learn to fight. But did she ask if you cared for it? No, she did not. You care not for fighting and neither for this training. Why must you do it? Fighting for what? To hurt someone? You don't want that!
		
	    *if who_went = "both"
		    Your gaze slides to Freya, narrowing. Does she want it? She looks like she is getting more into it than before. 

another example

I’m really not sure what the problem is because the visible indentation doesn’t work anymore despite being checked.

Judging by the error message, it’s because you’ve used both spaces and tabs to indent your if line. In the code you linked, the line starts with a tab, then 4 spaces, then the if statement. ChoiceScript probably doesn’t like you mixing both.

As for this, it’s a little hard to see from the picture alone, but it looks like your first if statement has nothing inside it. If it’s supposed to the white text underneath, that needs to be indented. If that’s not it, it could easily be the same problem as before. If I’m reading it correctly, it looks like you have a tab followed by 12 spaces on that line–if that’s what those dots symbolize in your editor’s syntax.

Sorry, that was just me testing. As you see, the first *if has those dotted lines at the start, and the empty line doesn’t show them, despite usually doing so.

I’m not exactly sure why they don’t show.

check if the program automatically turns a certain number of spaces into a tab somehow

Not just probably; It doesn’t like using both at all. Per the Introduction to ChoiceScript it says,

You can indent blocks using spaces or with the Tab character (but not both in the same file). You can use any number of spaces you want, but you must be consistent.

So the fact that there are both tabs and spaces, is what is producing the error. Now I’m going to assume, that when they’re nearly 4k lines into a file, they already know this. So like MeltingPenguins said, check if your tabs and/or spaces, are becoming tabs and/or spaces.

The issue isn’t that there is tabs and spaces, the issue is why are there tabs and spaces. That is the question, and I don’t think we can really answer, truth be told. My best guess is you borked the IDE by installing and deleting more than one version.

I would try a control test with plain ole Notepad(or your system’s equivalent) and if the issue still persist, it’s a computer problem. If it doesn’t, it is an IDE problem.

I’d check with Notepad++, it has a function of converting space-indents to tab-indents and vice versa.


Thank you, I shall try out in Notepad to see if I can figure out what is wrong.

I took the liberty of copypasting the code into scrivener to check the invisible characters:

the dots are spaces, the arrows are tabs.

Best guess is that whatever you used for writing converted a certain number of spaces into tabs?

Also, you don’t need that many spaces, small amounts will work just fine, they just have to be the correct count