Code not working of latest version

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
lovvlife
Newbie
Posts: 1
Joined: Thu Mar 29, 2018 7:28 am
Contact:

Code not working of latest version

#1 Post by lovvlife »

Code: Select all

screen entring:
    imagebutton
    xpos 0
    ypos 0
    idle ("assets/button/aw/aw_proceed_idle.png")
    hover ("assets/button/aw/aw_proceed_hover.png")
    action Jump("game_start")
    imagebutton
    xpos 0
    ypos 0
    idle ("//assets/button/aw/aw_exit_idle.png")
    hover ("//assets/button/aw/aw_exit_hover.png")
    action Jump("close_renpy")
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/screens.rpy", line 99: u'xpos' is not a keyword argument or valid child for the screen statement.
    xpos 0
        ^

Ren'Py Version: Ren'Py 6.99.14.2.3333
Thu Mar 29 16:59:55 2018
I don't know what to do, it used to work fine before now it is showing more and more errors, all i want to do is switch image when mouse hovers over a button

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Code not working of latest version

#2 Post by Remix »

You either need imagebutton and all attributes all on one line or use : to make blocks

Code: Select all

screen entring:
    imagebutton xpos 0 ypos 0 idle ("assets/button/aw/aw_proceed_idle.png") hover ("assets/button/aw/aw_proceed_hover.png") action Jump("game_start")
    imagebutton xpos 0 ypos 0 idle ("//assets/button/aw/aw_exit_idle.png") hover ("//assets/button/aw/aw_exit_hover.png") action Jump("close_renpy")

# or

screen entring:
    imagebutton:
        xpos 0
        ypos 0
        idle ("assets/button/aw/aw_proceed_idle.png")
        hover ("assets/button/aw/aw_proceed_hover.png")
        action Jump("game_start")
    imagebutton:
        xpos 0
        ypos 0
        idle ("//assets/button/aw/aw_exit_idle.png")
        hover ("//assets/button/aw/aw_exit_hover.png")
        action Jump("close_renpy")
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: No registered users