Persistent variable not working (to unlock new route) [SOLVED]
Posted: Wed May 04, 2022 11:37 am
Hello everyone,
I'm totally new to Renpy and know virtually nothing about coding... So far I've been relying on people asking questions and getting help on here;
I'm currently working on the last route in my silly VN and I tried following this tutorial as closely as possible: https://www.youtube.com/watch?v=43wJm3b ... lLearnings
The instructions are clear, and I feel like I followed them correctly, but it's not working. I am not using image buttons, so that might be why?
Here is what I did:
(This is all in the same .rpy file, specifically for the endings)
(This is in the "script.rpy" file)
I get this error message when I run the game:
```
File "game/script.rpy", line 7: invalid syntax
jump nroute_start
^
```
Also, this is my first post, so apologies if I did something wrong, feel free to correct me!
Thank you in advance!
I'm totally new to Renpy and know virtually nothing about coding... So far I've been relying on people asking questions and getting help on here;
I'm currently working on the last route in my silly VN and I tried following this tutorial as closely as possible: https://www.youtube.com/watch?v=43wJm3b ... lLearnings
The instructions are clear, and I feel like I followed them correctly, but it's not working. I am not using image buttons, so that might be why?
Here is what I did:
(This is all in the same .rpy file, specifically for the endings)
Code: Select all
label end1:
$persistent.end1 = True
#I show a bunch of images here until return#
label end2:
$persistent.end2 = True
#I show a bunch of images here until return#
label end3:
$persistent.end3 = True
#I show a bunch of images here until return#
Code: Select all
label start:
init python:
jump nroute_start
sensitive persistent.end1 == True and persistent.end2 == True and persistent.end3 == True
#Usual beginning of the game#
```
File "game/script.rpy", line 7: invalid syntax
jump nroute_start
^
```
Also, this is my first post, so apologies if I did something wrong, feel free to correct me!
Thank you in advance!