Code: Select all
default open_stairs_mainhall_door = False ## par defaut, la porte de la stairs room est fermée
## Définition des vues génériques
image stairsgf entrance = ConditionSwitch(
"from_room == 'mainhall'","stairsgf frommainhall",
open_stairs_mainhall_door,"stairsgf fromtvlounge open",
True,"stairsgf fromtvlounge closed"
)
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/stairs_groundfloor.rpy", line 19, in script
image stairsgf entrance = ConditionSwitch(
File "game/stairs_groundfloor.rpy", line 21, in <module>
open_stairs_mainhall_door,"stairsgf fromtvlounge open",
NameError: name 'open_stairs_mainhall_door' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/stairs_groundfloor.rpy", line 19, in script
image stairsgf entrance = ConditionSwitch(
File "/usr/share/games/renpy/renpy/ast.py", line 942, in execute
img = renpy.python.py_eval_bytecode(self.code.bytecode)
File "/usr/share/games/renpy/renpy/python.py", line 1836, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/stairs_groundfloor.rpy", line 21, in <module>
open_stairs_mainhall_door,"stairsgf fromtvlounge open",
NameError: name 'open_stairs_mainhall_door' is not defined
Linux-4.14.0-3-amd64-x86_64-with-debian-buster-sid
Ren'Py 6.99.14.1.3218
The House 0.1
Sat Mar 24 18:57:24 2018
I can't change the "default' for "define" as the value of 'open_stairs_mainhall_door' will change during the game. (I also tried to put open_stairs_mainhall_door between quotes, same error message)
I'm kind of stuck here