Error I get:
NameError: name 'park_1_done' is not defined
Place where the error happens:
if park_1_done == True:
Ergo what would be the initiallizing one to that?
$ park_1_done = False
at the beginning under Label start?
Something else?
(I swear, this all worked before Ren'Py updated?! xD")
name not defined
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- Destiny
- Veteran
- Posts: 468
- Joined: Thu Jun 14, 2012 2:00 pm
- Projects: Cards of Destiny, Sky Eye
- Location: Germany
- Contact:
name not defined
Cards of Destiny (WIP) / Sky Eye (WIP)
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: name not defined
More like:
Code: Select all
init:
$ park_1_done = False
- Destiny
- Veteran
- Posts: 468
- Joined: Thu Jun 14, 2012 2:00 pm
- Projects: Cards of Destiny, Sky Eye
- Location: Germany
- Contact:
Re: name not defined
Ok, worked, even though I have a big different problem right now .__.
The game now still doesn't like the variable, but instead of asking for a definition, it gives a error, then makes the game loop infinitely, followed by ignoring all input (I have a image map, but suddenly, all buttons go only to one spot):
Click for video (the loop is shown, not the "all buttons go to the same place")
The traceback of the error seen in the video is this: The exact spots of the code are:
536 till 555
and
label schule_3:
936 till 951
My guess would be the following:
I have the image map 6 times (all sending to a different label, there are no problems at those spots as far as I can tell) and - upon returning - the supporting character (the female) reacts depending on where the character had been.
She will also react depending on if he had been there before or not (she will make a different notion, if it is park_done_2 = True then when it is park_done_1 = True)
My guess is, that the game is unable to cope with the fact, that "park_done_1 = True" appears six times in the script (as she can react to it six times)? o_o
Could that be a possible reason? If yes, what would be good to do to avoid this repeating session ._.
The game now still doesn't like the variable, but instead of asking for a definition, it gives a error, then makes the game loop infinitely, followed by ignoring all input (I have a image map, but suddenly, all buttons go only to one spot):
Click for video (the loop is shown, not the "all buttons go to the same place")
The traceback of the error seen in the video is this: The exact spots of the code are:
536 till 555
Code: Select all
label example:
call screen example_imagemap
$ result = _return
if result == "park":
call park
elif result == "untere_etage":
call untere_etage
elif result == "schwimmbad":
call schwimmbad
elif result == "dach":
call dach
elif result == "obere_etage":
call obere_etage
elif result == "sporthalle":
call sporthalle
elif result == "dereks_zimmer":
call dereks_zimmer
label schule_3:
936 till 951
Code: Select all
scene bg zimmer abend
play music "Music/a - Mary - PeerGynt_Lobogris_-_You_Make_Me_Crazy__Jam_.mp3"
show m l
if sporthalle_2_done = True:
m b "It makes me so nervous to run."
r s "I thought you were used to it?"
m b "No, I\'m not used to being watched running by two good looking guys."
r c s "................................"
show r b
extend "\nYou\'re talking garbage again."
m l "Waah, you got bright red! \nCuuuuuuuuute!"
r b "Ah, keep your mouth shut!"
m l "Ok, ok."
jump gespräch_2
I have the image map 6 times (all sending to a different label, there are no problems at those spots as far as I can tell) and - upon returning - the supporting character (the female) reacts depending on where the character had been.
She will also react depending on if he had been there before or not (she will make a different notion, if it is park_done_2 = True then when it is park_done_1 = True)
My guess is, that the game is unable to cope with the fact, that "park_done_1 = True" appears six times in the script (as she can react to it six times)? o_o
Could that be a possible reason? If yes, what would be good to do to avoid this repeating session ._.
Cards of Destiny (WIP) / Sky Eye (WIP)
Re: name not defined
You post is too long and a bit confusing.
This code is invalid, you also don't have to compare values to booleans in Python/Ren'Py script.
or
will do nicely.
Code: Select all
if sporthalle_2_done = True:
Code: Select all
if sporthalle_2_done:
Code: Select all
if not sporthalle_2_done: # If False
Who is online
Users browsing this forum: Google [Bot]