- Feb 2, 2018
 
- 923
 
- 3,932
 
- 414
 
Hi mates,
I am having an issue with the current development when I am trying to call a screen, depending on a variable
I have this:
Label.rpy
	
	
	
			
Script.rpy
	
	
	
			
In the label hall, I can navigate, in the game from that point to the bath screen.
I wanted to create a condition where if the player hasn't passed the morrigan_bath_scene_01, to be redirected to that scene. Else if he did complete that scene to be directed to the bath screen where he can explore freely.
The problem is that when I start from the point where the player hasn't experience the morrigan_bath_scene_01 (where the condition is False) I am getting an error that is saying:
	
	
	
			
I've loaded the game before the variable to be triggered but I get the same message.
Is there any solution to this?
Thank you in advance
	
		
			
		
		
	
								I am having an issue with the current development when I am trying to call a screen, depending on a variable
I have this:
Label.rpy
		Code:
	
	label bath_opened_day_01:
if morrigan_bath_var_01 == False:
        jump morrigan_bath_scene_01
    elif morrigan_bath_var_01 == True:
        jump bath_opened_day_02
label bath_opened_day_02:
    call screen bath_opened_day_sc
	
		Code:
	
	label start;
"text"
$ morrigan_bath_var_01 == True
"text"
$ morrigan_bath_var_01 == False
jump credits_ending_part
label credits_ending_part:
"text"
jump label_hall
	I wanted to create a condition where if the player hasn't passed the morrigan_bath_scene_01, to be redirected to that scene. Else if he did complete that scene to be directed to the bath screen where he can explore freely.
The problem is that when I start from the point where the player hasn't experience the morrigan_bath_scene_01 (where the condition is False) I am getting an error that is saying:
		Code:
	
	I'm sorry, but an uncaught exception occurred.
While running game code:
  File "game/script.rpy", line 5550, in script
    $ morrigan_bath_var_01 == False
  File "game/script.rpy", line 5550, in <module>
    $ morrigan_bath_var_01 == False
NameError: name 'morrigan_bath_var_01' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
  File "game/script.rpy", line 5550, in script
    $ morrigan_bath_var_01 == False
  File "D:\renpy-7.1.0-sdk\renpy\ast.py", line 912, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\renpy-7.1.0-sdk\renpy\python.py", line 1959, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script.rpy", line 5550, in <module>
    $ morrigan_bath_var_01 == False
NameError: name 'morrigan_bath_var_01' is not defined
Windows-8-6.2.9200
Ren'Py 7.3.0.271
Vis 0.5
Mon Jun 24 12:28:00 2019
	Is there any solution to this?
Thank you in advance