- Jul 30, 2017
- 2,135
- 3,352
The dev just needs to add one line of code to fix the problem. I just tested it.Haven't started playing yet. Want to, but can't.
Downloaded it and got the issue where the game intro shows an error page, then you get to the main menu and it's fine. But when you just start the game, it gives another error.
The traceback:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 520, in script
if persistent.ph_advstart_ep >= 2:
File "game/script.rpy", line 520, in <module>
if persistent.ph_advstart_ep >= 2:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 520, in script
if persistent.ph_advstart_ep >= 2:
File "C:\Users\bay_y\Desktop\WhereTheHeartIs-Ep23-pc\WhereTheHeartIs-Ep23-pc\renpy\ast.py", line 2115, in execute
if renpy.python.py_eval(condition):
File "C:\Users\bay_y\Desktop\WhereTheHeartIs-Ep23-pc\WhereTheHeartIs-Ep23-pc\renpy\python.py", line 1092, in py_eval
return py_eval_bytecode(code, globals, locals)
File "C:\Users\bay_y\Desktop\WhereTheHeartIs-Ep23-pc\WhereTheHeartIs-Ep23-pc\renpy\python.py", line 1085, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 520, in <module>
if persistent.ph_advstart_ep >= 2:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
Windows-10-10.0.19045 AMD64
Ren'Py 8.0.3.22090809
Where The Heart Is Ep23
Tue Feb 21 23:13:16 2023
The problem occurs with people who've never played the game, so the persistent variable is not in the C:\Users\[username]\AppData\Roaming\RenPy\WhereTheHeartIs-1519902503 folder, from previous playthroughs, even from different versions? (pretty sure this is the case but i'm exhausted right now).
So you edit script.rpy, add that one line of code of below, then run the game, and the error won't happen.
script.rpy
Code:
########ADDED CODE
# set a default value. i'm not too familiar with his code, but this
# should work. we want to make sure the variable is not of type None.
# 0 seems to work fine for now. defaulting variables is a good practice.#
# there are some rare cases where people don't wnat to default the
# variable, but I truly believe you want to default your persistent variables.
# so tired, but I'll look into this more tomorrow.
default persistent.ph_advstart_ep = 0
########ADDED CODE
### BEGIN START ANY EPISODE CODE #Quickstart menu
label startanyepisodegal:
play music WTHI_Intro volume .5 fadein 2 #ace quickstart wthi intro start
$MC = player_name
You must be registered to see the links
The persistent object is special in that an access to an undefined field will have a None value, rather than causing an exception. If something other than None is to be the default of a persistent value, the
You must be registered to see the links
statement should be used:
Code:
default persistent.main_background = "princess_not_saved"
Last edited: