help with menus and ifs

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
x21314
Newbie
Posts: 2
Joined: Sat Jul 16, 2016 8:40 pm
Contact:

help with menus and ifs

#1 Post by x21314 »

im trying to make a menu and it gives me these errors

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 193, in script
    menu:
SyntaxError: invalid syntax (game/script.rpy, line 204)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 193, in script
    menu:
  File "C:\Users\xnz21\Downloads\renpy-6.99.10-sdk\renpy\ast.py", line 1451, in execute
    choice = renpy.exports.menu(choices, self.set)
  File "C:\Users\xnz21\Downloads\renpy-6.99.10-sdk\renpy\exports.py", line 815, in menu
    if renpy.python.py_eval(condition) ]
  File "C:\Users\xnz21\Downloads\renpy-6.99.10-sdk\renpy\python.py", line 1605, in py_eval
    code = py_compile(code, 'eval')
  File "C:\Users\xnz21\Downloads\renpy-6.99.10-sdk\renpy\python.py", line 512, in py_compile
    raise e
SyntaxError: invalid syntax (game/script.rpy, line 204)

Windows-8-6.2.9200
Ren'Py 6.99.10.1227
sexy camp fire adventures 0.0
and my code is

Code: Select all

menu:
    "Lets cook wieners" if wieners_done == False:
        jump wieners
    "Lets have smores" if smores_done == False:
        jump smores
    "Lets play tag" if tag_done == False:
        jump tag
    "Give me a history lesson" if history_done == False:
        jump hitler
    "Sleep" if wieners_done == True and smores_done == True and tag_done == True and history_done == True:
        jump sleepy_times
    "Sex" if wieners_done == True and smores_done == True and tag_done == True and history_done == True and wieners_sex = True and tag_sex = True:
        jump sexy_times
If anyone can help i would appreciate it

User avatar
andrewngn13
Regular
Posts: 65
Joined: Thu Nov 13, 2014 2:41 pm
Projects: Recast
Skype: andrewngn13
Location: Glued to my desktop
Contact:

Re: help with menus and ifs

#2 Post by andrewngn13 »

Code: Select all

 "Sex" if wieners_done == True and smores_done == True and tag_done == True and history_done == True and wieners_sex = True and tag_sex = True:
Not all of the '==' are '=='. Some of them are just '='.

Code: Select all

 "Sex" if wieners_done == True and smores_done == True and tag_done == True and history_done == True and wieners_sex == True and tag_sex == True:
"Feel feel to idea-bounce off me."
No, like seriously, just send a pm and I'll respond what I think. I'm open to reading anything.

x21314
Newbie
Posts: 2
Joined: Sat Jul 16, 2016 8:40 pm
Contact:

Re: help with menus and ifs

#3 Post by x21314 »

andrewngn13 wrote:

Code: Select all

 "Sex" if wieners_done == True and smores_done == True and tag_done == True and history_done == True and wieners_sex = True and tag_sex = True:
Not all of the '==' are '=='. Some of them are just '='.

Code: Select all

 "Sex" if wieners_done == True and smores_done == True and tag_done == True and history_done == True and wieners_sex == True and tag_sex == True:
Thank you

Post Reply

Who is online

Users browsing this forum: No registered users