Page 1 of 1

need help with code

Posted: Thu Mar 05, 2015 2:05 pm
by Tiger Tech
It is giving me a pop up about indentation. I am new and stuck Thanks! :D

Where are my indentations wrong?
It gives me pop ups about line 52, 62 and 78.



# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image Barton standing= "Tall-skinny-man-1-.jpg"
image street ="sokaklambasnnindawallpa.jpg"
image arrow ="images.jpeg"
image helicopter = "how-to-draw-a-helicopt...50_5.jpg"
image highway = "highway_401_night_lapse_busy.jpg"
image mans car = "force-one-inside-of-drivers-side-open-door-039.jpg"
image down highway = "stock-footage-timelapse-shot-driving-at-night-on-a-wet-toronto-highway.jpg"
image co-op city = "images copy 2.jpeg"
image outside building = "outsidebuilding.jpg"
image elevator = "6.jpg"
image floor= "floor.jpg"
image machine ="coff.jpg"
image hall = "hotel.jpg"
image dark = "black.jpg"
image wife = "lil.jpg"
image apartment = "apart.jpg"
image game over = "go.jpeg"
image tv = "Unknown.jpeg"
image room = "bedroom.jpg"
image theater = "snapple.jpg"
image barton inside = "brandon-neutral.png"
image dan = "denzel.jpg"
image dansit = "dansit.jpeg"
# Declare characters used by this game.
define b = Character('Barton', color="#c8ffc8")
define a = Character ('???', color= "#c8ffc8")
define mys = Character ('Mystierious Man', color= "#c8ffc8")
define me = Character ('Me', color= "#477c82")
define l = Character ('Lilita', color= "#FF69B4")
define n = Character ('Newscaster', color= "#d45b19")
define manage = Character ('Manager', color= "#c8ffc8")
define dan = Character ('Daniel', color= "#34DDDD")
# The game starts here.
label start:
scene street
show Barton standing
b "Listen to me."
b "My name is Barton."
b "I'm here to tell you a few things about how to play this game."
label arrow:
show arrow
b " on the bottom, you can see your prefrences."
b " you can change the text speed, the volume and save, the game."
b " If you want to skip, you can do that as well."
hide arrow
b " In the game you will be presented with menus, much like this one."

menu:
"yes, I do.":
jump choice1
label choice1:
b "These are used constantly throughout the game, so remember them."
b "(Also, when a character speaks in perenthesis it means they are thinking)"
b " Now, are you ready to enter the world?"
menu:
"yes.":
jump yeschoicebarton
"no.":
jump arrow
label yeschoicebarton:
b " Good, welcome to live at 11. We will meet again"
scene street
with dissolve
pause (2.0)
scene highway
play music "car.mp3"
a "What do you know about life..."
a "One day, You're standing there, happy, and the next, your buisness is failing, and your on the highway trying to get a rid."
a " And everyone just ignores you, right there as life just passess by."
a " Soon, you just think. Too much. Until the absolute complexity of your thinking explodes, and every last second can be sensed"
label thoughts:
a "Have you ever felt that way?"
menu:
"Yes, for sure":
jump yesforsurechoice
$ highway = "yeahforsure"
"No, I haven't":
jump noforsurechoice
$ highway = "noihavent"
"what?":
jump thoughts
label yesforsurechoice:
a "I know how all these thoughts correspond."
a "It's a science, really."
a "Just a way of figuring out the way time is, just standing there."
a "Sometimes life can be amazing."
a "God,I'm cold."
a "Why does no one care about me?!"
a "There's a car, I think it's stopping for me."
a "Oh, thank god!"
show mans car
mys "get in."
hide mans car
jump inthecartime
label noforsurechoice:
a "Well, that is unfortunate."
a " I find it's just a science, a guideline that life must follow"
a "God,I'm cold."
a "Why does no one care about me?!"
a "There's a car, I think it's stopping for me."
a "Oh, thank god!"

Re: need help with code

Posted: Thu Mar 05, 2015 2:10 pm
by xavimat
Please, to show your code in this forum put it inside the code tags: [ code ] ...your code... [ /code ] (without the spaces).
The result is:

Code: Select all

 ...your code... 
and we'll be able to see your indentation.

Re: need help with code

Posted: Thu Mar 05, 2015 2:41 pm
by Tiger Tech
# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image Barton standing= "Tall-skinny-man-1-.jpg"

Code: Select all

image street ="sokaklambasnnindawallpa.jpg"
image arrow ="images.jpeg"
image helicopter = "how-to-draw-a-helicopt...50_5.jpg"
image highway = "highway_401_night_lapse_busy.jpg"
image mans car = "force-one-inside-of-drivers-side-open-door-039.jpg"
image down highway = "stock-footage-timelapse-shot-driving-at-night-on-a-wet-toronto-highway.jpg"
image co-op city = "images copy 2.jpeg"
image outside building = "outsidebuilding.jpg"
image elevator = "6.jpg"
image floor= "floor.jpg"
image machine ="coff.jpg"
image hall = "hotel.jpg"
image dark = "black.jpg"
image wife = "lil.jpg"
image apartment = "apart.jpg"
image game over = "go.jpeg"
image tv = "Unknown.jpeg"
image room = "bedroom.jpg"
image theater = "snapple.jpg"
image barton inside = "brandon-neutral.png"
image dan = "denzel.jpg"
image dansit = "dansit.jpeg"
# Declare characters used by this game.
define b = Character('Barton', color="#c8ffc8")
define a = Character ('???', color= "#c8ffc8")
define mys = Character ('Mystierious Man', color= "#c8ffc8")
define me = Character ('Me', color= "#477c82")
define l = Character ('Lilita', color= "#FF69B4")
define n = Character ('Newscaster', color= "#d45b19")
define manage = Character ('Manager', color= "#c8ffc8")
define dan = Character ('Daniel', color= "#34DDDD")
# The game starts here.
label start:
scene street
show  Barton standing
b "Listen to me."
b "My name is Barton." 
b "I'm here to tell  you a few things about how to play this game."
label arrow:
show  arrow
b " on the bottom, you can see your prefrences."
b " you can change the text speed, the volume and save, the game."
b " If you want to skip, you can do that as well."
hide  arrow
b " In the game you will be presented with menus, much like this one."

    menu:
    "yes, I do.":
    jump choice1
label choice1:
b "These are used constantly throughout the game, so remember them."
b "(Also, when a character speaks in perenthesis it means they are thinking)"
b " Now, are you ready to enter the world?"
menu:
    "yes.":
        jump yeschoicebarton
            "no.":
            jump arrow
                label yeschoicebarton:
        b " Good, welcome to live at 11. We will meet again"
        scene street
        with dissolve
        pause (2.0)
        scene highway
        play music "car.mp3" 
        a "What do you know about life..."          
        a "One day, You're standing there, happy, and the next, your buisness is failing, and your on the highway trying to get a rid."  
        a " And everyone just ignores you, right there as life just passess by."  
        a  " Soon, you just think. Too much. Until the absolute complexity of your thinking explodes, and every last second can be sensed"
        label thoughts:
        a "Have you ever felt that way?"
        menu:
            "Yes, for sure":
            jump yesforsurechoice
            $ highway = "yeahforsure"
                "No, I haven't":
                jump noforsurechoice
                $ highway = "noihavent"
                    "what?":
                    jump thoughts
                        label yesforsurechoice:
                        a "I know how all these thoughts correspond."
                        a "It's a science, really."
                        a "Just a way of figuring out the way time is, just standing there."
                        a "Sometimes life can be amazing."
                        a "God,I'm cold."
                        a "Why does no one care about me?!"
                        a "There's a car, I think it's stopping for me."
                        a "Oh, thank god!"
                        show mans car
                        mys "get in."
                        hide mans car
                        jump inthecartime
                            label noforsurechoice:
                              a "Well, that is unfortunate."
                              a " I find it's just a science, a guideline that life must follow"
                              a "God,I'm cold."
                              a "Why does no one care about me?!"
                              a "There's a car, I think it's stopping for me."
                              a "Oh, thank god!" 

Re: need help with code

Posted: Thu Mar 05, 2015 3:23 pm
by trooper6
This question should be in the Question thread, not the development thread.

Anyway. There are a lot of indentation errors in the code you posted. A lot.
You should note the following--after you have a colon, ":", you must indent. When you are done with the subsection that took the indent, you indent back out one level again. This is especially important with menus. Don't throw in indents randomly otherwise.

Also, I like having blank spaces in-between my larger blocks of code just to make things a bit clearer.

Here is my take on your code. Study seriously the differences between your original code and mine. Hopefully that will help you figure out what you need to do in the future:

Code: Select all

# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image Barton standing= "Tall-skinny-man-1-.jpg"
image street ="sokaklambasnnindawallpa.jpg"
image arrow ="images.jpeg"
image helicopter = "how-to-draw-a-helicopt...50_5.jpg"
image highway = "highway_401_night_lapse_busy.jpg"
image mans car = "force-one-inside-of-drivers-side-open-door-039.jpg"
image down highway = "stock-footage-timelapse-shot-driving-at-night-on-a-wet-toronto-highway.jpg"
image co-op city = "images copy 2.jpeg"
image outside building = "outsidebuilding.jpg"
image elevator = "6.jpg"
image floor= "floor.jpg"
image machine ="coff.jpg"
image hall = "hotel.jpg"
image dark = "black.jpg"
image wife = "lil.jpg"
image apartment = "apart.jpg"
image game over = "go.jpeg"
image tv = "Unknown.jpeg"
image room = "bedroom.jpg"
image theater = "snapple.jpg"
image barton inside = "brandon-neutral.png"
image dan = "denzel.jpg"
image dansit = "dansit.jpeg"

# Declare characters used by this game.
define b = Character('Barton', color="#c8ffc8")
define a = Character ('???', color= "#c8ffc8")
define mys = Character ('Mystierious Man', color= "#c8ffc8")
define me = Character ('Me', color= "#477c82")
define l = Character ('Lilita', color= "#FF69B4")
define n = Character ('Newscaster', color= "#d45b19")
define manage = Character ('Manager', color= "#c8ffc8")
define dan = Character ('Daniel', color= "#34DDDD")

# The game starts here.
label start:
    scene street
    show  Barton standing
    b "Listen to me."
    b "My name is Barton." 
    b "I'm here to tell  you a few things about how to play this game."

label arrow:
    show  arrow
    b " on the bottom, you can see your prefrences."
    b " you can change the text speed, the volume and save, the game."
    b " If you want to skip, you can do that as well."
    hide  arrow
    b " In the game you will be presented with menus, much like this one."

    menu:
    "yes, I do.":
        jump choice1

label choice1:
    b "These are used constantly throughout the game, so remember them."
    b "(Also, when a character speaks in perenthesis it means they are thinking)"
    b " Now, are you ready to enter the world?"
    menu:
        "yes.":
            jump yeschoicebarton
        "no.":
            jump arrow
            
label yeschoicebarton:
    b " Good, welcome to live at 11. We will meet again"
    scene street
    with dissolve
    pause (2.0)
    scene highway
    play music "car.mp3" 
    a "What do you know about life..."          
    a "One day, You're standing there, happy, and the next, your buisness is failing, and your on the highway trying to get a rid."  
    a "And everyone just ignores you, right there as life just passess by."  
    a "Soon, you just think. Too much. Until the absolute complexity of your thinking explodes, and every last second can be sensed"
        
label thoughts:
    a "Have you ever felt that way?"
    menu:
        "Yes, for sure":
            jump yesforsurechoice
            $ highway = "yeahforsure"
        "No, I haven't":
            jump noforsurechoice
            $ highway = "noihavent"
        "what?":
            jump thoughts
                    
label yesforsurechoice:
    a "I know how all these thoughts correspond."
    a "It's a science, really."
    a "Just a way of figuring out the way time is, just standing there."
    a "Sometimes life can be amazing."
    a "God,I'm cold."
    a "Why does no one care about me?!"
    a "There's a car, I think it's stopping for me."
    a "Oh, thank god!"
    show mans car
    mys "get in."
    hide mans car
    jump inthecartime
                            
label noforsurechoice:
    a "Well, that is unfortunate."
    a " I find it's just a science, a guideline that life must follow"
    a "God,I'm cold."
    a "Why does no one care about me?!"
    a "There's a car, I think it's stopping for me."
    a "Oh, thank god!"
    
label inthecartime:
    a "This game is over now"
    return

Re: need help with code

Posted: Thu Mar 05, 2015 5:16 pm
by Tiger Tech
Thank you so much!