persistent indentation error

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
gennethapang
Newbie
Posts: 10
Joined: Sat May 27, 2017 11:34 pm
Tumblr: gennethapang
Deviantart: gennethapang
Contact:

persistent indentation error

#1 Post by gennethapang » Wed May 31, 2017 3:14 pm

Hello,
I've tried watching and reading many tutorials over and over. However, no matter what I try to edit, I often have this error saying that I have a mismatched indentation. I don't know what's really wrong, then. I've even counted the number of spaces per line. I even looked at many examples, even on the tutorials. So, the most I could think of as the source of this error is the editing tool that I've chosen. However, I don't know how I can look up and change my editing tool on the ren'py engine. So, I would like some really informative answers on what I can do to fix this mismatched indentation.

I even tried starting a new file and typed up the example formats. I tried to work on a clean slate with a new script file. This still says that I have an indentation error. This error is killing me, and I need to know how I can make this game to have a good idea on my route story formats and if this engine can handle a menu of four options.

This is how my current script looks. I hope that anyone reading this can understand the formatting this file has.

# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

define b = Character(“Boss”)


# The game starts here.

Code: Select all

label start:

    # Show a background. This uses a placeholder by default, but you can
    # add a file (named either "bg room.png" or "bg room.jpg") to the
    # images directory to show it.

    scene bg room

    # This shows a character sprite. A placeholder is used, but you can
    # replace it by adding a file named "eileen happy.png" to the images
    # directory.

    # These display lines of dialogue.
    
    b “Hello based on my tight schedule I have to ask you this"

    b “which of one of you two shall join the Freshwater or Saltwater groups"

    “She files through a large stack of papers"

    “each filing by the fingers makes the papers more crinkled"

    b “I’ve decided that..."

    menu:

        “...young man, Rojo Pisces to the freshwater.":
            jump rojofreshwater

        “...young lady, Azul Pisces to the saltwater.":
            jump azulsaltwater

        “...young man, Rojo Pisces to the saltwater.":
            jump rojosaltwater

        “...young lady, Azul Pisces to the freshwater.":
            jump azulfreshwater

        #end of menu, start of labels

label rojofreshwater:

    b “You, Rojo Pisces." 

label azulsaltwater:

    b “Azul Pisces, how do you feel being assigned to work with the saltwaters."

label rojosaltwater:

    b “Rojo, to the saltwaters. Your sister shall go work with the freshwaters."

label azulfreshwater:

    b “Ms. Azul Pisces, I need you to work with the freshwaters.”

    # This ends the game.

    return
Please, I need help on how to fix this indentation error.

edit: okay, I put in the code tags to the best of my ability. I'm not sure if this is the right way to do this. If I didn't, please, I'd be happy to get some details on what I should and shouldn't do in typing up the code tags. Also, I hope that the indentations that I'm typing while typing this comment will translate to when the text is submitted.

edit 2:Well, I added a set of code tags to the entire script...I think...i hope.
Last edited by gennethapang on Sat Jun 03, 2017 6:06 pm, edited 2 times in total.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: persistent indentation error

#2 Post by Imperf3kt » Wed May 31, 2017 3:21 pm

Repaste the code between

Code: Select all

 tags, as it is it won't keep the indentation on the forum.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

gennethapang
Newbie
Posts: 10
Joined: Sat May 27, 2017 11:34 pm
Tumblr: gennethapang
Deviantart: gennethapang
Contact:

Re: persistent indentation error

#3 Post by gennethapang » Wed May 31, 2017 5:35 pm

Imperf3kt wrote:Repaste the code between

Code: Select all

 tags, as it is it won't keep the indentation on the forum.[/quote]

Thank you for that notification. I've just edited my topic comment with the code tags. I hope that this is well typed up.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: persistent indentation error

#4 Post by Imperf3kt » Wed May 31, 2017 5:46 pm

Sorry, but you only need to place one set of tags.

For example: (minus the spaces)
[ code ]
This is my text
This is more text
Somewhere in here is an indentation issue
Can you help me find it?[ /code ]

That will look like this when put inside the tags

Code: Select all

This is my text
    This is more text
        Somewhere in here is an indentation issue
      Can you help me find it?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

gennethapang
Newbie
Posts: 10
Joined: Sat May 27, 2017 11:34 pm
Tumblr: gennethapang
Deviantart: gennethapang
Contact:

Re: persistent indentation error

#5 Post by gennethapang » Fri Jun 02, 2017 10:00 pm

Imperf3kt wrote:Sorry, but you only need to place one set of tags.

For example: (minus the spaces)
[ code ]
This is my text
This is more text
Somewhere in here is an indentation issue
Can you help me find it?[ /code ]

That will look like this when put inside the tags

Code: Select all

This is my text
    This is more text
        Somewhere in here is an indentation issue
      Can you help me find it?
This is more informative, but what about the code tags for lines on top of each other where the indentations are literally the same, as in their indentations are aligned with each other?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: persistent indentation error

#6 Post by Imperf3kt » Sat Jun 03, 2017 12:15 am

Just paste the whole script between the code tags, the forum will preserve everything.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: persistent indentation error

#7 Post by IrinaLazareva » Sat Jun 03, 2017 3:40 am

About indentation error, just follow this scheme:

Image

in more detail: https://www.renpy.org/wiki/renpy/FAQ#Ho ... _blocks.3F

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]