Code: Select all
if chefhat and "fnormal" in renpy.get_attributes("belmontstandard"):
"belmontstandard_hat_hatnormal"
elif chefhat and "ftilt" in renpy.get_attributes("belmontstandard"):
"belmontstandard_hat_hattilt"
If true, he wears the hat as expected, but I get an error if I try to use transitions like fade/dissolve on the full scene (when he's in it) or on the sprite itself. I don't get an error if I hide him with easeoutright. Here's the error:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 2844, in script
with dissolve
File "game/definitions.rpy", line 371, in <module>
if chefhat and "fnormal" in renpy.get_attributes("belmontcooking"):
TypeError: argument of type 'NoneType' is not iterable
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 2844, in script
with dissolve
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/ast.py", line 1443, in execute
renpy.exports.with_statement(trans, paired)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/exports.py", line 1684, in with_statement
return renpy.game.interface.do_with(trans, paired, clear=clear)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 2762, in do_with
clear=clear)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 3325, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 3737, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 568, in visit_all
d.visit_all(callback, seen)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/core.py", line 558, in visit_all
for d in self.visit():
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/layout.py", line 1415, in visit
self.update(self.last_st, self.last_at)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/layout.py", line 1426, in update
raw_child, redraw = self.function(st, at, *self.args, **self.kwargs)
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/layout.py", line 1517, in condition_switch_show
return condition_switch_pick(switch), None
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/display/layout.py", line 1508, in condition_switch_pick
if renpy.python.py_eval_bytecode(code):
File "/Users/Bob/Shobo/visual novels/renpy-7.4.4-sdk/renpy/python.py", line 2269, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/definitions.rpy", line 371, in <module>
if chefhat and "fnormal" in renpy.get_attributes("belmontcooking"):
TypeError: argument of type 'NoneType' is not iterable
Darwin-18.7.0-x86_64-i386-64bit
Ren'Py 7.4.11.2266
CWB Test 1.0
Wed Dec 15 18:23:03 2021
It's not the end of the world, since the hat only lasts for a short part of the game and I can avoid transitions if I need to. But obviously, I'd like to fix whatever I did wrong. Thanks in advance!