'RevertableList' object is not callable

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
Shie
Newbie
Posts: 9
Joined: Sun Apr 14, 2019 4:12 am
Github: 0Shie0
itch: shie
Contact:

'RevertableList' object is not callable

#1 Post by Shie » Tue Apr 23, 2019 11:26 am

It worked some time and than stopped working.
Here is code, please, tell me if i've done something wrong

Code: Select all

init python:
    class MyClass:
        def __init__(self,smf):
            self.smf = smf

    list = [MyClass(1)]
    a = 3

screen MyScreen(b):
    vbox:
        text "[a]"
        button action SetVariable("a", b.smf):
            text "click"
            
label start:
    call screen MyScreen (list[0])
"While running game code:
File "renpy/common/00library.rpy", line 247, in _predict_statements
rv = list(config.predict_start_labels)
TypeError: 'RevertableList' object is not callable"

User avatar
Remix
Eileen-Class Veteran
Posts: 1377
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: 'RevertableList' object is not callable

#2 Post by Remix » Tue Apr 23, 2019 12:34 pm

list is a reserved word in Python

suggest just change it to:

my_list = [ MyClass() ]

or somesuch
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Develop Cartoon Speech Bubble dialogue
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

Shie
Newbie
Posts: 9
Joined: Sun Apr 14, 2019 4:12 am
Github: 0Shie0
itch: shie
Contact:

Re: 'RevertableList' object is not callable

#3 Post by Shie » Tue Apr 23, 2019 2:04 pm

Thanks! Such a silly mistake(

Post Reply

Who is online

Users browsing this forum: darkforte