I'm sorry, but my if statement inside the menu doesn't work

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
Lambda '00'
Newbie
Posts: 10
Joined: Fri Jun 08, 2007 10:22 pm
Location: insane
Contact:

I'm sorry, but my if statement inside the menu doesn't work

#1 Post by Lambda '00' »

Well, the title explains most of it, here is the code:

Code: Select all

label briefingrm:
        menu:
            "look around":
                "This is the briefing room."
                "It is utilitarian, like the rest of the facility."
                "There is a holoprojector in the middle of the room."
                "Displayed is a map of an enemy installation."
                $ lookedaroundbriefingroom = True
                
            "Location" if lookedaroundbriefingroom == True:
                "The installation is in the _______."
                $ location_viewed = True
                
            "Enemies" if location_viewed == True:
                "There are ____, _____, _____, and a base commander."
[/color]

Error Message:
NameError: name 'lookedaroundbriefingroom' is not defined
:oops:
Vode An (Brothers all)

Lambda '00'
Newbie
Posts: 10
Joined: Fri Jun 08, 2007 10:22 pm
Location: insane
Contact:

#2 Post by Lambda '00' »

oh, wait, nevermind... I forgot to define the variables at the outset *whacks self in head*
Vode An (Brothers all)

Post Reply

Who is online

Users browsing this forum: Google [Bot]