Noob here starting story.. Illegal mixing of spaces and tabs error Help


#1

[deleted]


#2

This means you are using tabs and spaces both but the script only allows one to be used for indentation.


#3

For the second choices *finish command it seems you indented it with using tab, instead of space. So it is indented 2 characters as others but two more spaces. So you need to do it with spaces instead. Or do all with tabs. You need to decide on which to use and use the same indentation the whole way.

This is wrong :point_down:

Try this :point_down:

And since the character count is the same (or whatever reason), it doesn’t look like something is wrong, but there is. :slight_smile:


#4

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


#5

Whatever you want, just decide now and use the same thing for all the code. Tabs, or spaces. Choose which suits you best :slight_smile:

You just cant use tabs and start using spaces halfway through.


#6

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


#7

Indentation means the number of spaces, to make the code valid. So if you start with using tabs you need to go with all tabs. So that makes no tabs for *choice then one tab for #option then 2 tabs for *finish or *goto command. The same goes for spaces. So it will either look like this

*choice 
 #option
  *finish

Or this

*choice
    #option 
        *finish

Or whatever spaces/tabs you want. (Remember! Spaces or tabs.)

What im trying to say is you need pre-determined indentation type + indentation level.
Indentation type means you wheter use space or tab to indent a line
Indentation level means whether you use one space/tab or two space/tab to indent a line.

So this will be wrong;

*choice
    #choice1.  
        *finish
      #choice2.  
        *finish  

Or even if your indentation level is true, if your indentation type is not the same, it will give errors such as the one you asked in this thread.


#8

Did you change all of the options ?

Your indentation level is correct, but the type still seems off.


#9

‘’’

*choice
	#What? Why?
		You are about to be exectuted. We must hurry if we want to survive.
		*finish
	#Nooo... I wanna sleep
		There is no time for that... we must leave now if we want to survive
		*finish
	#How dare you? (Slap Him)
		relation with khavas decrese)
		Gani Khamma! But if you want to live we must hurry
		*finish
'''

This still doesn’t work

startup line 59: Illegal mixing of spaces and tabs; this line has a tab, but there were spaces on line 26


#10

Can you send all of the code in PM so i can have a look at that on pc. This seems fine on mobile but it can be tricky at times.


#11

@Sykox Your scenes below *scene_list should be indented the same type as well. After that if you still keep getting errors, i would suggest just delete it all and start again with paying attention to both indentation type and level.

EDIT: The error indicates that your scene_list indentation type is wrong. If you’re going with tabs just make the scenes below indented with a tab. That should fix it :slight_smile:


#12

Done! either 2 space or single tab… consistence throughout the file… Thanks @needs-to-be-loved


#13

Most welcome :grin: :grin: