There's an Error I Can't Spot (Come Here for Help)


Hello, I’m new here and have just finished writing a prolouge for my first choice script game. Every time I run it I run into problems, I have corrected most so far, but I have one I don’t understand yet:

Line 54: illegal mixing of spaces and tabs: this line has a space, but there were tabs on 53

I’ve also noticed that there are quite a few threads dedicated to single errors people encounter in their choice scripts, asking for help isolating them. I may be overstepping my bounds, being a very new person to this forum, but I felt that things would be a bit cleaner or smoother if we had a whole thread dedicated to asking help finding them.

Try using this tool to simplify the proccess:


@Yamamato When you make indents, you made all of them with tabs, but you used the space button for line 54. Delete the indent and make it with tab.


Tried changing the text a few ways, but I couldn’t isolate the problem. Here’s the text:

“Sir!” you start, “I am called ${name}-”

Something blindsides you without warning, throwing you off your
feet. Your head swims as you put a hand to your head, (line 54)
pulling it back to find a bloodied paw. Looking up through bleary eyes,
you see the figure pull back a hand glad in dark steel.

None of the recruits look relaxed anymore.

“Wrong, you have no name other than the one we gave you when you arrived.
From now on, until I say otherwise, you are Recruit Fifty-eight. Pick
yourself up.” (line 60)

The (line ##) isn’t there when I run it, that’s for ease of identification.


@Yamamato: I had a similar problem. If you’re using Notepad ++, go to edit then Blank Operations and click on spaces to tab (all) or spaces to tab (leading). I think that’s it. :-?


Like DSeg said, you’re just mixing the usage of tab indents and space indents. If you’re using Notepad ++ just find Line 54 and erase the space or spaces and change that indent into a tab.

If you’re not using Notepad ++ to write a Choicescript game, I recommend switching to it now, as it’s invaluable when writing CS games. I’m sure there are alternative programs, but I haven’t heard anyone advocating them on the forums. (For computers that is. Mobile writers each have their own preferences.)

Also, the Choicescript Tester has a relative, who’s a bit more attractive, and capable of a bit more. The CSIDE is kind of a big deal.

As for using a single thread for errors, it’s a commendable idea, but I think most people will likely create their own discussion for their own problems. It’s not such a terrible issue, though, since most people do put their problems under the ChoiceScrip Help category.


@Caddmuss Well… I personally like TextWrangler more, it just looks better.

That and I’m on a Mac, Notepad ++ won’t work on Macs.

But yeah, anyways, if Notepad ++ can show the tabs spacing and all that, I’d highly recommend it so you can see if there are ever any spaces mixing with them.


Downloaded Notepad++, fixed my first issue, now I have something saying “Line 57: invalid indent, expected at least one line in ‘if’ true block”.

What’s wrong now?


you has to wrote something inside a if block like:
*if poison true
----Lucrecia go to cinema.


Still not clear on what’s the issue. The concearned line is:

“Sir!” you start, “I am called ${name}-”

if that helps.


That’s odd. MaraJade hit it on the head.

Do you have an *if somewhere?


Also the code line isnt the numerical line order we use normaly you need search a text editor that counts code line


@Caddmuss I have “*if (”{name}" true != "!{name}")" just above it.


I find it easier to help if people start their own threads. Chances are I won’t check a longer thread in order to help out.

You need to indent that Sir line.


*if ("${name}" true != "$!{name}
    "Sir!" you start, "I am called ${name}-"


exactly i was ninjaz by fairy


Thanks, but now I have something saying “increasing indent not allowed, expected 0 was 1” Line in question is:

“R-recruit Fifty-Eight… sir?”
->*set name Recruit Fifty-Eight


No indent. So

“R-recruit Fifty-Eight... sir?”

*set name "Recruit Fifty-Eight"

If you were doing it in a choice format it’d be: (Without appropriate finish/gotos in place)

    #Recruit 58
        “R-recruit Fifty-Eight... sir?”
        *set name "Recruit Fifty-Eight"
    #Recruit 59
        “R-recruit Fifty-Nine... sir?”
        *set name "Recruit Fifty-Nine"


Changed… now how do I make variables as a percentile?

For example, I have “*create Strength 0%” but it doesn’t work.


The wiki’s got a good explanation. I’d check it out.


Messed around with it for a bit then kept getting this error message: non-existant variable ‘strength’." My current stat chart is this:

*create Name “”
*create Gender “”
percent Strength
percent Endurance
percent Willpower
percent Agility
percent Intelligence
percent Charisma
percent Subtlety
percent Strategist
percent Efficiency
percent Loyalty
percent Discipline
percent Insanity

Edit: percents don’t seem to indent.


You need to create the stats first before you can display them.