Page 1 of 1

The use of "renpy.pause(hard = True)" is causing the game to crash, and I don't know why

Posted: Tue Oct 25, 2022 1:43 am
by LewdEdits
No sure what I'm doing wrong on my end, but what's causing the issue, at least how I understand it is the use of $ renpy.pause(hard = True).
As far as I understand, I'm using correctly, I've used it before to stop the game from going anywhere, but recently it keeps brining up this error screen when I use it.

Below is the label I'm jumping to that has it and causing the crash.

Code: Select all

label YourRoomStart:
    scene bg_YourRoom
    show screen nav_control
    show screen map
    
    $ renpy.pause(hard = True)
And here is the error message I'm seeing.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/locations.rpy", line 8, in script
    $ renpy.pause(hard = True)
  File "game/locations.rpy", line 8, in <module>
    $ renpy.pause(hard = True)
  File "renpy/common/00action_data.rpy", line 79, in get_selected
    return __get_field(self.object, self.field, self.kind) == self.value
  File "renpy/common/00action_data.rpy", line 36, in _m1_00action_data__get_field
    for i in name.split("."):
AttributeError: 'int' object has no attribute 'split'

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

Full traceback:
  File "game/locations.rpy", line 8, in script
    $ renpy.pause(hard = True)
  File "C:\Programs Custom\Renpy\renpy\ast.py", line 1131, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Programs Custom\Renpy\renpy\python.py", line 1061, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/locations.rpy", line 8, in <module>
    $ renpy.pause(hard = True)
  File "C:\Programs Custom\Renpy\renpy\exports.py", line 1537, in pause
    rv = renpy.ui.interact(mouse='pause', type='pause', roll_forward=roll_forward, pause=delay, pause_modal=modal)
  File "C:\Programs Custom\Renpy\renpy\ui.py", line 299, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 3377, 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 "C:\Programs Custom\Renpy\renpy\display\core.py", line 3810, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Programs Custom\Renpy\renpy\display\screen.py", line 456, in visit_all
    self.child.visit_all(callback, seen=None)
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 584, in visit_all
    callback(self)
  File "C:\Programs Custom\Renpy\renpy\display\core.py", line 3810, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Programs Custom\Renpy\renpy\display\behavior.py", line 968, in per_interact
    if self.is_selected():
  File "C:\Programs Custom\Renpy\renpy\display\behavior.py", line 956, in is_selected
    return is_selected(self.action)
  File "C:\Programs Custom\Renpy\renpy\display\behavior.py", line 398, in is_selected
    return any(is_selected(i) for i in action)
  File "C:\Programs Custom\Renpy\renpy\display\behavior.py", line 398, in <genexpr>
    return any(is_selected(i) for i in action)
  File "C:\Programs Custom\Renpy\renpy\display\behavior.py", line 401, in is_selected
    return action.get_selected()
  File "renpy/common/00action_data.rpy", line 79, in get_selected
    return __get_field(self.object, self.field, self.kind) == self.value
  File "renpy/common/00action_data.rpy", line 36, in _m1_00action_data__get_field
    for i in name.split("."):
AttributeError: 'int' object has no attribute 'split'

Windows-10-10.0.19044 AMD64
Ren'Py 8.0.3.22090809
Game 0.1
Mon Oct 24 22:20:08 2022
Any help would be greatly appreciated, I've been stuck on this issue for 2 days now, I'm so lost.

Re: The use of "renpy.pause(hard = True)" is causing the game to crash, and I don't know why

Posted: Tue Oct 25, 2022 2:27 am
by LewdEdits
Update, my current "fix" has been to start a new project and copy everything relevant over, I'm not running into the same issue as of yet.

Re: The use of "renpy.pause(hard = True)" is causing the game to crash, and I don't know why

Posted: Tue Oct 25, 2022 2:44 am
by LewdEdits
Seems I might have narrowed down the issue to a single misplaced comma and lack of quotation marks.

Code: Select all

screen nav_control:
# Your Room Navigation
    if room_tracker == 40:
        imagebutton:
            auto "navigation/B_Nav_%s.png"
            focus_mask True
            xpos 200 ypos 880
            action Jump ("YourRoomStart1"), SetVariable ("room_tracker", 42)
On the last line, I had typed out
SetVariable (room_tracker, 42),
I adjusted that and it seemed to have solved the issue, at least for now.