Illegal mixing of spaces and tabs

Heheh, soo I’m new at this… but I’m having so much fun writing, I can’t stop! Anywho…

So, I’m trying to let the player chose their gender. I created the variables and tested the game out.

Here is the error I am talking about:

“gender line 15: Illegal mixing of spaces and tabs; this line has a space, but there were tabs on line 14”

Here is the script:

"*label gender

What gender are you?

*set gender “male”
*set he “he”
*set him “him”
*set his “his”
*set man “man”
*set sir “sir”
*set mr “Mr.”
*Page_Break Next Page
*goto_scene scene01

	*set gender "female"
	*set he "she"
	*set him "her"
	*set his "her"
	*set man "woman"
	*set sir "ma'am"
	*set mr "Ms."
	*Page_Break Next Page
            *goto_scene scene01

What am I doing wrong? o_0

Male choice is formatted like the Female!

What do you use to code?
It usually means that you have both tab and soace used to create indents.


Ohh, ahh… umm Notepad++

With the choicescript addon? Iirc that can help prevent mixing. Alternative try checking CSide?

I have tried checking CSide, but I think the old way is easier tbh, but thanks anyway! ^^

What I did when I used notepad++ (I use CSIDE now) was set it to replace tabs with spaces. That way you don’t accidentally get them mixed up. If you must use actual tabs, you may have a single, hard to see, space at the front of one of the lines - that quite often occurs when you delete things (or at least it did when I deleted things!).

But, shouldn’t the male options also be indented the way the females ones are? It’s also showing different open and close quotes for the strings in the male section, that’s a guaranteed way to confuse the engine.
If that’s just the way it’s being displayed here, you can surround your code with ``` tags and it’ll be formatted the way you entered it. That’ll make it a lot easier to help…

Use the search on the forum.

1 Like