freeCodeCamp / LearnToCodeRPG

A visual novel video game where you learn to code and get a dev job 🎯
https://www.freecodecamp.org/news/learn-to-code-rpg-1-5-update/
BSD 3-Clause "New" or "Revised" License
1.05k stars 110 forks source link

Game crashes at rhythm minigame #62

Closed DuxVictorum closed 2 years ago

DuxVictorum commented 2 years ago

What bug did you encounter?

The game crashes whenever I try to play the rhythm minigame.

Steps to Reproduce

As soon as I click on any one of the songs in the rhythm mini game, it immediately displays the attached screenshot. I can safely rollback, but I can't do anything in the minigame.

Screenshots

rhythm minigame error 1

Additional Information

Here's the full error log:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 1229, in script call
    call day_activity_choices from _call_day_activity_choices_6
  File "game/scripts/labels/day_activity_choices.rpy", line 15, in script call
    call day_activity_relax from _call_day_activity_relax
  File "game/scripts/labels/day_activity_choices.rpy", line 167, in script call
    call day_activity_video_game from _call_day_activity_video_game
  File "game/scripts/labels/day_activity_choices.rpy", line 287, in script call
    call rhythm_game_entry_label from _call_rhythm_game_entry_label
  File "game/scripts/rhythm_minigame.rpy", line 573, in script
    call screen rhythm_game(rhythm_game_displayable)
  File "renpy/common/000statements.rpy", line 569, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "game/scripts/rhythm_minigame.rpy", line 67, in execute
    screen rhythm_game(rhythm_game_displayable):
  File "game/scripts/rhythm_minigame.rpy", line 67, in execute
    screen rhythm_game(rhythm_game_displayable):
  File "game/scripts/rhythm_minigame.rpy", line 81, in execute
    vbox:
  File "game/scripts/rhythm_minigame.rpy", line 101, in execute
    showif rhythm_game_displayable.has_game_started:
  File "game/scripts/rhythm_minigame.rpy", line 103, in execute
    text _('Score: [score+str]'):
NameError: Name 'score+str' is not defined.

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

Full traceback:
  File "game/script.rpy", line 1229, in script call
    call day_activity_choices from _call_day_activity_choices_6
  File "game/scripts/labels/day_activity_choices.rpy", line 15, in script call
    call day_activity_relax from _call_day_activity_relax
  File "game/scripts/labels/day_activity_choices.rpy", line 167, in script call
    call day_activity_video_game from _call_day_activity_video_game
  File "game/scripts/labels/day_activity_choices.rpy", line 287, in script call
    call rhythm_game_entry_label from _call_rhythm_game_entry_label
  File "game/scripts/rhythm_minigame.rpy", line 573, in script
    call screen rhythm_game(rhythm_game_displayable)
  File "renpy/ast.py", line 2010, in execute
    self.call("execute")
  File "renpy/ast.py", line 1998, in call
    return renpy.statements.call(method, parsed, *args, **kwargs)
  File "renpy/statements.py", line 278, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 569, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "renpy/exports.py", line 3132, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "renpy/ui.py", line 298, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 3276, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
  File "renpy/display/core.py", line 3694, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/core.py", line 568, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 432, in visit_all
    callback(self)
  File "renpy/display/core.py", line 3694, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "renpy/display/screen.py", line 443, in per_interact
    self.update()
  File "renpy/display/screen.py", line 631, in update
    self.screen.function(**self.scope)
  File "game/scripts/rhythm_minigame.rpy", line 67, in execute
    screen rhythm_game(rhythm_game_displayable):
  File "game/scripts/rhythm_minigame.rpy", line 67, in execute
    screen rhythm_game(rhythm_game_displayable):
  File "game/scripts/rhythm_minigame.rpy", line 81, in execute
    vbox:
  File "game/scripts/rhythm_minigame.rpy", line 101, in execute
    showif rhythm_game_displayable.has_game_started:
  File "game/scripts/rhythm_minigame.rpy", line 103, in execute
    text _('Score: [score+str]'):
  File "renpy/text/text.py", line 1551, in __init__
    self.set_text(text, scope, substitute)
  File "renpy/text/text.py", line 1670, in set_text
    i, did_sub = renpy.substitutions.substitute(i, scope, substitute)
  File "renpy/substitutions.py", line 270, in substitute
    s = formatter.vformat(s, (), kwargs)
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 563, in vformat
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 585, in _vformat
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 646, in get_field
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 605, in get_value
  File "renpy/substitutions.py", line 228, in __getitem__
    raise NameError("Name '{}' is not defined.".format(key))
NameError: Name 'score+str' is not defined.

Windows-10-10.0.19041
Ren'Py 7.4.8.1895
Learn to Code RPG 1.0
Wed Jan 19 12:17:26 2022
RuolinZheng08 commented 2 years ago

Hi @DuxVictorum Would you mind trying the latest build on itch? I think this has been fixed in 266da11ba1849cd31f0f22f3a866dbfe44fb1b88. Please feel free to reopen this issue if problems persist.

DuxVictorum commented 2 years ago

Yup, I reinstalled and everything works well now! Mark

On Mon, Jan 24, 2022, 10:17 PM Lynn Zheng @.***> wrote:

Closed #62 https://github.com/freeCodeCamp/LearnToCodeRPG/issues/62.

— Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/LearnToCodeRPG/issues/62#event-5947037677, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARLRI5FCX7NF5XVMZ4LKP7DUXYP5NANCNFSM5MKVHRFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>