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.06k stars 110 forks source link

Calendar crashes #34

Closed Lauro235 closed 2 years ago

Lauro235 commented 2 years ago

What bug did you encounter?

At some point quite late on in the game I reached a point where every time I tried to pass a certain point the game would crash.

Steps to Reproduce

I don't know what to say. It was the only bug I encountered after around 4 hours of game play. I have included the script error which is an IndexError

Screenshots

No response

Additional Information

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 1331, in script
    $ calendar.next_week()
  File "game/script.rpy", line 1331, in <module>
    $ calendar.next_week()
  File "game/scripts/calendar.rpy", line 29, in next_week
    self.day = self.day - self.days_count[self.month] - 1
IndexError: list index out of range

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

Full traceback:
  File "game/script.rpy", line 1331, in script
    $ calendar.next_week()
  File "renpy/ast.py", line 923, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2235, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/script.rpy", line 1331, in <module>
    $ calendar.next_week()
  File "game/scripts/calendar.rpy", line 29, in next_week
    self.day = self.day - self.days_count[self.month] - 1
  File "renpy/python.py", line 992, in __getitem__
    rv = list.__getitem__(self, index)
IndexError: list index out of range

Windows-10
Ren'Py 7.4.8.1895
Learn to Code RPG 1.0
Thu Dec 30 09:04:43 2021
SentinelWarren commented 2 years ago

Hello @Lauro235, this was resolved in https://github.com/freeCodeCamp/LearnToCodeRPG/commit/9cf71ad614ade30d298edcc6f9b897b09ced30c9, see #17.

RuolinZheng08 commented 2 years ago

Thanks for the bug report! Fixed in #17 Please feel free to download the updated version from itch. Your saved game should carry over without a problem.