I want to create a persistent data to know if the player had already played the game once or not.
So I create something like that
Code: Select all
init:
$randomothervariableIneed = 0
define persistent.gameplayed = None
label start:
if persistent.gameplayed = true:
"True"
else:
"false"
[BLABLABLA THE GAME]
persistent.gameplayed = true
return
But I got this error :
(Line 33 is where there is the "if").
Thank you to everyone, I look forward, to soluce my problem.
EDIT : It's weird, because it seems, that it's the "true"/"false"/"none" that doesn't work, because if I try with 0/1 for example, it actually work
Something like that (I put the code working instead it is actually a terrible optimisation, or if someone has the same problem than me !
Code: Select all
define m = Character("[player_name]", color="#F7DD9E", who_outlines=[ (3, "#78462D") ])
default persistent.gamefinished = 0
init python:
l_adrala = 0
# Le jeu commence ici
label start:
if persistent.gamefinished == 0:
"C'est la première fois que le jeu est joué"
else:
"C'est la deuxième fois"
[blabla jeu]
"fin"
$ persistent.gamefinished = 1
return