kyouryuukunn / renpy-ActionEditor3

125 stars 13 forks source link

TypeError: unsupported operand type(s) for +: 'position' and 'int' #29

Closed Noriverwater closed 10 months ago

Noriverwater commented 10 months ago

Hi, I got the following error in the 8.2.0 prerelease when using the atl_wiggle and mfn function:

Full traceback:
  File "D:\program files\renpy-8.2.0-sdk\renpy\ast.py", line 615, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "D:\program files\renpy-8.2.0-sdk\renpy\exports.py", line 1493, in say
    who(what, *args, **kwargs)
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 1298, in __call__
    return Character(kind=self, **kwargs)(what, interact=interact, _call_done=_call_done, multiple=multiple, _mode=_mode, _with_none=_with_none)
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 1391, in __call__
    self.do_display(who, what, cb_args=self.cb_args, dtt=dtt, **display_args)
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 1042, in do_display
    display_say(who,
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 738, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "D:\program files\renpy-8.2.0-sdk\renpy\ui.py", line 301, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\core.py", line 2153, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\core.py", line 2802, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\core.py", line 1353, in draw_screen
    surftree = renpy.display.render.render_screen(
  File "render.pyx", line 486, in renpy.display.render.render_screen
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\transform.py", line 948, in render
    return RenderTransform(self).render(width, height, st, at)
  File "accelerator.pyx", line 966, in renpy.display.accelerator.RenderTransform.render
  File "accelerator.pyx", line 401, in renpy.display.accelerator.RenderTransform.render_child
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 913, in render
    offset = child.place(rv, 0, 0, width, height, surf)
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\displayable.py", line 487, in place
    placement = self.get_placement()
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\transform.py", line 1039, in get_placement
    rv = self.state.get_placement(cxoffset, cyoffset)
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\transform.py", line 202, in get_placement
    self.xoffset + cxoffset,
TypeError: unsupported operand type(s) for +: 'position' and 'int'

code:

    show bg5:
        function mfn(atl_wiggle("yoffset", max=5, deviation=40, cycle=20, fast_forward=3), atl_wiggle("xoffset", max=5, deviation=40, cycle=70, fast_forward=3))  
kyouryuukunn commented 10 months ago

I updated https://github.com/kyouryuukunn/renpy-ActionEditor3/releases/tag/240119

Noriverwater commented 10 months ago

Unfortunately, a new error has occurred:

Executing ATL code at game/herocomplex/chapter4.rpy:6
  File "game/ActionEditor3/ATL_functions.rpy", line 98, in __call__
    fr = self.fns[i](tran, st, at)
  File "game/ActionEditor3/ATL_functions.rpy", line 122, in __call__
    fr = self.function(tran, st, at)
  File "game/ActionEditor3/ATL_functions.rpy", line 199, in function
    interpolate_spline = renpy.atl.interpolate_spline(g, self.random_knot, renpy.atl.PROPERTIES[self.property])
TypeError: interpolate_spline() takes 2 positional arguments but 3 were given

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "D:\program files\renpy-8.2.0-sdk\renpy\ast.py", line 615, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "D:\program files\renpy-8.2.0-sdk\renpy\exports.py", line 1493, in say
    who(what, *args, **kwargs)
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 1298, in __call__
    return Character(kind=self, **kwargs)(what, interact=interact, _call_done=_call_done, multiple=multiple, _mode=_mode, _with_none=_with_none)
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 1391, in __call__
    self.do_display(who, what, cb_args=self.cb_args, dtt=dtt, **display_args)
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 1042, in do_display
    display_say(who,
  File "D:\program files\renpy-8.2.0-sdk\renpy\character.py", line 738, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "D:\program files\renpy-8.2.0-sdk\renpy\ui.py", line 301, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\core.py", line 2153, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\core.py", line 2802, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\core.py", line 1353, in draw_screen
    surftree = renpy.display.render.render_screen(
  File "render.pyx", line 486, in renpy.display.render.render_screen
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\transform.py", line 948, in render
    return RenderTransform(self).render(width, height, st, at)
  File "accelerator.pyx", line 966, in renpy.display.accelerator.RenderTransform.render
  File "accelerator.pyx", line 401, in renpy.display.accelerator.RenderTransform.render_child
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\layout.py", line 900, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 170, in renpy.display.render.render
  File "render.pyx", line 260, in renpy.display.render.render
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\transform.py", line 946, in render
    self.update_state()
  File "D:\program files\renpy-8.2.0-sdk\renpy\display\transform.py", line 1125, in update_state
    fr = self.execute(self, self.st, self.at)
  File "D:\program files\renpy-8.2.0-sdk\renpy\atl.py", line 728, in execute
    action, arg, pause = block.execute(trans, timebase, self.atl_state, events)
  File "D:\program files\renpy-8.2.0-sdk\renpy\atl.py", line 973, in execute
    action, arg, pause = stmt.execute(trans, target - start, child_state, events)
  File "D:\program files\renpy-8.2.0-sdk\renpy\atl.py", line 2020, in execute
    fr = self.function(trans, st if block else 0, trans.at)
  File "game/ActionEditor3/ATL_functions.rpy", line 98, in __call__
    fr = self.fns[i](tran, st, at)
  File "game/ActionEditor3/ATL_functions.rpy", line 122, in __call__
    fr = self.function(tran, st, at)
  File "game/ActionEditor3/ATL_functions.rpy", line 199, in function
    interpolate_spline = renpy.atl.interpolate_spline(g, self.random_knot, renpy.atl.PROPERTIES[self.property])
TypeError: interpolate_spline() takes 2 positional arguments but 3 were given
kyouryuukunn commented 10 months ago

please sent the result of renpy.version_tuple.

Noriverwater commented 10 months ago

VersionTuple(major=8, minor=2, patch=0, commit=24011408)

kyouryuukunn commented 10 months ago
  1. Edit "renpy.version_tuple[3] >= 24010100" -> "renpy.version_tuple[3] >= 24011600" on line 198 in ATL_functions.rpy
  2. If error is caused, update ren'py to latest prerelease v8.2.0.24011701
Noriverwater commented 10 months ago

Error solved.

ありがとうございました。