Code: Select all
window:
style_group "readback"
side "c r":
frame:
$ vp = ui.viewport(mousewheel = True, offsets=(0.0, yvalue), yadjustment = adj)
vbox:
null height 10
python:
count=1
total=0
mass = lines_to_show
for i in mass:
if i[1]:
if not i[2]:
total+=1
for line in lines_to_show:
if line[0] and line[0] != " ":
label line[0] # name
if line[1]:
# if there's no voice just log a dialogue
if not line[2]:
python:
cn=total-count
count+=1
if font_size == "small":
textbutton line[1] text_size 28 style "log_button" text_style "log_button_text" action FunctionCallback(do_rollback,cn)
elif font_size == "large":
textbutton line[1] text_size 35 style "log_button" text_style "log_button_text" action FunctionCallback(do_rollback,cn)
else:
null height
else:
textbutton line[1] action Play("voice", line[2] )
null height 10
python:
count=None
total=None
mass=None
Code: Select all
class FunctionCallback(Action):
def __init__(self,function,*arguments):
self.function=function
self.arguments=arguments
def __call__(self):
return self.function(self.arguments)#"script.rpy", line 50
def do_rollback(cnt):
k=cnt[0]
renpy.rollback(True, k)#"script.rpy", line 78
I've commented the lines from traceback in my code mentioned above.I'm sorry, but an uncaught exception occurred.
While running game code:
File "scenario/prologue/prologue.rpy", line 97, in script
File "renpy/common/00action_menu.rpy", line 78, in python
File "renpy/common/00gamemenu.rpy", line 144, in script
File "renpy/common/00gamemenu.rpy", line 144, in python
File "script.rpy", line 50, in python
File "script.rpy", line 78, in python
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "c:\renpy\renpy\bootstrap.py", line 265, in bootstrap
renpy.main.main()
File "c:\renpy\renpy\main.py", line 332, in main
run(restart)
File "c:\renpy\renpy\main.py", line 90, in run
renpy.execution.run_context(True)
File "c:\renpy\renpy\execution.py", line 509, in run_context
context.run()
File "c:\renpy\renpy\execution.py", line 288, in run
node.execute()
File "c:\renpy\renpy\ast.py", line 453, in execute
renpy.exports.say(who, what, interact=self.interact)
File "c:\renpy\renpy\exports.py", line 757, in say
who(what, interact=interact)
File "c:\renpy\renpy\character.py", line 795, in __call__
self.do_display(who, what, cb_args=self.cb_args, **display_args)
File "c:\renpy\renpy\character.py", line 671, in do_display
**display_args)
File "c:\renpy\renpy\character.py", line 474, in display_say
rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
File "c:\renpy\renpy\ui.py", line 237, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "c:\renpy\renpy\display\core.py", line 1853, in interact
repeat, rv = self.interact_core(preloads=preloads, **kwargs)
File "c:\renpy\renpy\display\core.py", line 2392, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\screen.py", line 319, in event
rv = self.child.event(ev, x, y, st)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\behavior.py", line 625, in event
rv = run(self.clicked)
File "c:\renpy\renpy\display\behavior.py", line 211, in run
return var(*args, **kwargs)
File "renpy/common/00action_menu.rpy", line 78, in __call__
renpy.call_in_new_context("_game_menu", _game_menu_screen=screen)
File "c:\renpy\renpy\game.py", line 369, in call_in_new_context
return renpy.execution.run_context(False)
File "c:\renpy\renpy\execution.py", line 509, in run_context
context.run()
File "c:\renpy\renpy\execution.py", line 288, in run
node.execute()
File "c:\renpy\renpy\ast.py", line 718, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "c:\renpy\renpy\python.py", line 1297, in py_exec_bytecode
exec bytecode in globals, locals
File "renpy/common/00gamemenu.rpy", line 144, in <module>
$ ui.interact()
File "c:\renpy\renpy\ui.py", line 237, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "c:\renpy\renpy\display\core.py", line 1853, in interact
repeat, rv = self.interact_core(preloads=preloads, **kwargs)
File "c:\renpy\renpy\display\core.py", line 2392, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\transition.py", line 45, in event
return self.new_widget.event(ev, x, y, st) # E1101
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\screen.py", line 319, in event
rv = self.child.event(ev, x, y, st)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "c:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "c:\renpy\renpy\display\layout.py", line 1382, in event
rv = super(Viewport, self).event(ev, x, y, st)
File "c:\renpy\renpy\display\layout.py", line 175, in event
rv = d.event(ev, x - xo, y - yo, st)
File "c:\renpy\renpy\display\layout.py", line 749, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "c:\renpy\renpy\display\behavior.py", line 625, in event
rv = run(self.clicked)
File "c:\renpy\renpy\display\behavior.py", line 211, in run
return var(*args, **kwargs)
File "script.rpy", line 50, in __call__
return self.function(self.arguments)
File "script.rpy", line 78, in do_rollback
renpy.rollback(True, k)
File "c:\renpy\renpy\exports.py", line 994, in rollback
renpy.game.log.rollback(checkpoints, greedy=greedy, label=label, force=force)
File "c:\renpy\renpy\python.py", line 1148, in rollback
raise Exception("Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?")
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?
Any help would be appreciated!