Script 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
vitum
Newbie
Posts: 10
Joined: Mon Feb 20, 2012 3:33 pm
Contact:

Script error

#1 Post by vitum » Sat Feb 25, 2012 1:48 pm

What's wrong with this script?

Code: Select all

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



# Declare images below this line, using the image statement.

image school front = "schoolday.png"

image room = "roomday.png"

image stairs = "hstairsday.png"

image hall = "hallwayday.png"

image class = "classroomday.png"

image bed = "bedroomday.png"

image nurse = "nurseday.png"

image office = "officeday.png"

image doctor = "nurseinoffice.png"

image sylvie normal = "sylvie2_normal.png"



# Declare characters used by this game.

define e = Character('Eileen', color="#c8ffc8")





# The game starts here.

label start:



init python:

    

    show_window_trans = MoveTransition(0.25,

                                       enter_factory=MoveIn((None, 

                                       1.0, None, 0.0)))



    hide_window_trans = MoveTransition(0.25,

                                       leave_factory=MoveOut((None, 

                                       1.0, None, 0.0)))

        

    def hide_window():

        store._window_during_transitions = False

        narrator("", interact=False)

        renpy.with_statement(None)

        renpy.with_statement(hide_window_trans)



    def show_window():

        narrator("", interact=False)

        renpy.with_statement(show_window_trans)

        store._window_during_transitions = True







    



















line 55    scene school front



    

    show sylvie normal



    

    e "Welcome!"



    e "Go ahead, go inside."



    $ hide_window()





init python:

    

    style.window.right_padding = 100



    up_arrow = True





init python:

    

    style.window.right_padding = 100



    up_arrow = True



    def up_arrow_function():

        if up_arrow:

            ui.vbox(xpos=0.99, ypos=0.98, xanchor='right', yanchor='bottom')

            ui.textbutton("Up", clicked=scene_room, xminimum=80)

            ui.close()



init python:

   

    style.window.right_padding = 100



    up_arrow = True



    def up_arrow_function():

        if up_arrow:

            ui.vbox(xpos=0.99, ypos=0.98, xanchor='right', yanchor='bottom')

            ui.textbutton("Up", clicked=scene_room, xminimum=80)

            ui.close()



    config.overlay_functions.append(up_arrow_function)





    













  line 109  show sylvie normal



    

    e "This is the living room."



    e "Do you like it?"



    return






It's just a sample and ever time I run it this is the error

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the

errors listed below, and try again.





File "game/script.rpy", line 55: invalid syntax

    scene school front

                ^

    



File "game/script.rpy", line 109: invalid syntax

    show sylvie normal

               ^

    



Ren'Py Version: Ren'Py 6.13.7.1646

I tried spacing out the lines with error but it still didn't work. Any suggestions?

Thanks!

HigurashiKira
Miko-Class Veteran
Posts: 832
Joined: Mon Nov 01, 2010 9:10 pm
Contact:

Re: Script error

#2 Post by HigurashiKira » Sat Feb 25, 2012 2:07 pm

The problem is that you have your init python in your label. Bove all your extra code above the label start and it should fix the error
I have moved to a new account. Please contact me here from now on. T/Y~

vitum
Newbie
Posts: 10
Joined: Mon Feb 20, 2012 3:33 pm
Contact:

Re: Script error

#3 Post by vitum » Sun Feb 26, 2012 7:46 pm

Thanks! That helped a lot.

Post Reply

Who is online

Users browsing this forum: Google [Bot]