Page 1 of 1

Error: UserParser object has no attribute 'nchildren'

Posted: Tue Sep 27, 2016 12:59 pm
by Morhighan
Hey there!
I'm not sure what I did but I've been getting this error.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While parsing D:\Visual Novel Projects\Project Files\Connection Pending/game/screens.rpy.
AttributeError: 'UseParser' object has no attribute 'nchildren'
I took a break from coding for a couple weeks so I have no recollection of what I was doing before this started.

I'm going to include the traceback, so if someone could maybe point me in the right direction, that would be awesome! Other files are available upon request.

Re: Error: UserParser object has no attribute 'nchildren'

Posted: Tue Sep 27, 2016 1:18 pm
by Morhighan
The problem disappears when I remove this:

Code: Select all

## Profile screen ##############################################################
## 

screen profile():

    tag menu

    use game_menu(_("Profile"), scroll="viewport"):

        style_prefix "profile"

        has vbox:
            xpos 600
            ypos 415
            xmaximum 600
            ymaximum 240
            top_padding 3
            bottom_padding 10
            left_padding 10
            right_padding 10
            vbox:
                hbox:
                    xfill True
                    text "Profiles" xpos 30 ypos 0
                    #imagebutton auto "images/interface/cross_%s.png" xalign 1.0 ypos 5 right_padding 7 action Return() 

                
init python:
    profile = Gallery()

    profile.button("profile_1")
    profile.image("profile_andrea.png")
    profile.status("profile1_status")

    fi.transition = dissolve


Re: Error: UserParser object has no attribute 'nchildren'

Posted: Wed Sep 28, 2016 9:06 am
by Ocelot
Default game_menu screen with

Code: Select all

scroll="viewport"
uses following code:

Code: Select all

vbox:
    transclude
In your use statement you have has statement. According to documentation, vbox cannot have has statement.

I think you just need to remove line

Code: Select all

has vbox:
. Otherwise you will have vbox in vbox in vbox which does not make much sense.