Invalid Syntax Error for Menu Choice (SOLVED)

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
FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Invalid Syntax Error for Menu Choice (SOLVED)

#1 Post by FruitSeller »

Alright, please keep in mind that I'm an absolute newbie when it comes to ren'py, never had any experience in this kind of thing before and I was just interested in making a small little game for all for my foruming buddies. Anyway, I kind of suck at this and I think I've run into a problem here. The spacing seems fine to me, since I've done it before with another menu choice grouping and it had no issues - though, I suppose the menu I'm having trouble with is slightly more complicated and therefore it's easier to me to miss something.
Anyway, here it is (or at least, where the trouble starts) :

Code: Select all

  menu:
        "What's with your name?" if name_leta = true:
            jump thenameisleta

            
        "I'm just wondering - do we have uniforms?" if uniform = true:
            jump uniformsmayb
        
        "What's with the houses?" if houses = true:
            jump housesmate
          
label thenameisleta: 
    "Emilylacee" "What's with your name?" 
    "Leta" "What do you mean?"
    "Emilylacee" "Well... it's not exactly a foruming username."
    "Leta" "So?"
    "Emilylacee" "I mean, you must have been one of the first um, submissions..."
    "Leta" "I still don't get your point."
    "She's obviously clueless, I can see."
    "Emilylacee" "Nevermind, it's nothing."
    $ name_leta = false
    jump menu1
label housesmate:
    "I ask about the houses."
    "Emilylacee" "What's with the weird house names? Are we sorted in them for specific reasons?"
    "Leta smirks."
    "Leta" "House 5 is the undecided group - our actions, grades and several other factors decide if we go up or down. Our dorms don't changed if we get removed from our ranking, though."
    "Leta" "The highest you can be in is House 1 - it's pretty much for the most amazing people around."
    "Leta" "...However, there is another group even more prestigious than House 1 - it's shrouded in mystery."
    "Emilylacee" "What do you mean?"
    "Leta" "The name is House L, nobody really knows anything about it. However, the students in House L are..."
    "Leta" "Different, I suppose."
    "Leta" "Anyway, the lowest house ranking you can get is House 10 - I don't know how the hell you get there, but once you're there, you're expelled."
    "Emilylacee" "Seems fair, I suppose."
    "Leta" "Yes, very fair."
    "Emilylacee" "Oh..." 
    $ houses = false
    "Leta" "...Anymore questions, Emilylacee?"
    jump menu1
label uniformsmayb:
    "I had been wondering about the uniform issue for a while now." 
    "Emilylacee" "Alright - do we need to wear uniforms."
    "Leta" "Uniform is manditory. However, males have no uniform and are strictly permitted to wear certain types of clothing - we aren't nessacerily told what exactly - since we're women."
    "Emilylacee" "What? Seriously, they don't wear a uniform but we have to?"
    "Leta" "The dresscode is very strict."
    "Emilylacee" "I guess..." 
    $ uniform = false
As you can see, the game doesn't really make much sense to outsiders, maybe it might to you but yeah.

Um, I also think you need um the Traceback thing. (forgive me, I suck at this ;-;) :

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 208, in script
    menu:
SyntaxError: invalid syntax (game/script.rpy, line 209)
Line 209 is pretty much the first line of code, by the way.
But it's pretty much the first line of code, truthfully - so it shouldn't be too hard to find.

I know this problem is gonna seem painfully easy to you guys but that's what I'm hoping for. ;-;
Thank you!
Last edited by FruitSeller on Sun Jun 22, 2014 3:52 pm, edited 1 time in total.

Valmoer
Regular
Posts: 53
Joined: Sat Feb 04, 2012 9:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice

#2 Post by Valmoer »

Hello FruitSeller, and welcome to the Ren'py community! (or to its forums, at the very least) :roll: Hope you'll have much fun with your current and future projects.

Code: Select all

  menu:
        "What's with your name?" if name_leta = true:
            jump thenameisleta
           
        "I'm just wondering - do we have uniforms?" if uniform = true:
            jump uniformsmayb
       
        "What's with the houses?" if houses = true:
            jump housesmate
I think your problem starts here : you've used in your condition checks =, the assignation operator (x = a <=>Set x to a) where you should have used ==, the comparison operator (a == b <=>Is a equal to b).

EDIT: I've just tested it, and I can confirm it is the issue.
Also, the boolean constants are capitalized and case-sensitive, they are True and False. true and false are user-level variables.

FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice

#3 Post by FruitSeller »


I think your problem starts here : you've used in your condition checks =, the assignation operator (x = a <=>Set x to a) where you should have used ==, the comparison operator (a == b <=>Is a equal to b).

EDIT: I've just tested it, and I can confirm it is the issue.
Also, the boolean constants are capitalized and case-sensitive, they are True and False. true and false are user-level variables.
Oh thank you so much! <333
It solves the problem! Thank you! c:

*Internet hug*

User avatar
Dizzydude
Regular
Posts: 58
Joined: Mon May 26, 2014 8:40 pm
Projects: 「To Be Announced」
Location: U.S.A
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#4 Post by Dizzydude »

Wait.. are you from the forum I think you're from?
And isn't this the game you're making?

Unless I'm mistaken. Emilylacee just looked familiar.

FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#5 Post by FruitSeller »

Dizzydude wrote:Wait.. are you from the forum I think you're from?
And isn't this the game you're making?

Unless I'm mistaken. Emilylacee just looked familiar.
Depends on what forum you're from, friend.
I'm DiamondDragonair/DiamondDratini
OT?

User avatar
Dizzydude
Regular
Posts: 58
Joined: Mon May 26, 2014 8:40 pm
Projects: 「To Be Announced」
Location: U.S.A
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#6 Post by Dizzydude »

Depends on what forum you're from, friend.
I'm DiamondDragonair/DiamondDratini
OT?
Yeah, OT. Dizzydude2 here. Knew it was an OTer.
Did I have a conversation about ren'py with you, or was that someone else? My memory is horrible.

FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#7 Post by FruitSeller »

Dizzydude wrote:
Depends on what forum you're from, friend.
I'm DiamondDragonair/DiamondDratini
OT?
Yeah, OT. Dizzydude2 here. Knew it was an OTer.
Did I have a conversation about ren'py with you, or was that someone else? My memory is horrible.
I think you did.

Darn, there's already going to be leaked information.
However, I'll likely have to delete that menu because of its refusal to work.

User avatar
Dizzydude
Regular
Posts: 58
Joined: Mon May 26, 2014 8:40 pm
Projects: 「To Be Announced」
Location: U.S.A
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#8 Post by Dizzydude »

I think you did.

Darn, there's already going to be leaked information.
However, I'll likely have to delete that menu because of its refusal to work.

Nah, I won't tell anything, no worries. But is the problem that you're trying to return to that menu, and let them go on only if they've finished it? I have a menu like that in the game I'm making. Otherwise, you could just keep asking questions here.. People won't get annoyed, trust me. I've asked a ton.

FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#9 Post by FruitSeller »

Dizzydude wrote:
I think you did.

Darn, there's already going to be leaked information.
However, I'll likely have to delete that menu because of its refusal to work.

Nah, I won't tell anything, no worries. But is the problem that you're trying to return to that menu, and let them go on only if they've finished it? I have a menu like that in the game I'm making. Otherwise, you could just keep asking questions here.. People won't get annoyed, trust me. I've asked a ton.
Thank you ;-;

The menu pretty much works like this : Once you've asked a question, you can't ask it again and it pretty much ends up only having the 'exit menu' option left when you've read all of it, I think you know what I'm talking about.


I just don't want to get anyone angry - I waited like, five hours until I finally got the guts to post here. ;-;
I was worried somebody was gonna be like
"Get out."
or something.
;-;

User avatar
Dizzydude
Regular
Posts: 58
Joined: Mon May 26, 2014 8:40 pm
Projects: 「To Be Announced」
Location: U.S.A
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#10 Post by Dizzydude »

FruitSeller wrote:
Dizzydude wrote:
I think you did.

Darn, there's already going to be leaked information.
However, I'll likely have to delete that menu because of its refusal to work.

Nah, I won't tell anything, no worries. But is the problem that you're trying to return to that menu, and let them go on only if they've finished it? I have a menu like that in the game I'm making. Otherwise, you could just keep asking questions here.. People won't get annoyed, trust me. I've asked a ton.
Thank you ;-;

The menu pretty much works like this : Once you've asked a question, you can't ask it again and it pretty much ends up only having the 'exit menu' option left when you've read all of it, I think you know what I'm talking about.


I just don't want to get anyone angry - I waited like, five hours until I finally got the guts to post here. ;-;
I was worried somebody was gonna be like
"Get out."
or something.
;-;


Lol, I'm sure everyone will be nice. But what's the problem with the menu you have currently, with all the fixes that've been done to it? It seems like that would work, as long as you have the exit option there.

FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#11 Post by FruitSeller »

Dizzydude wrote:
Dizzydude wrote:
I think you did.




Nah, I won't tell anything, no worries. But is the problem that you're trying to return to that menu, and let them go on only if they've finished it? I have a menu like that in the game I'm making. Otherwise, you could just keep asking questions here.. People won't get annoyed, trust me. I've asked a ton.


Lol, I'm sure everyone will be nice. But what's the problem with the menu you have currently, with all the fixes that've been done to it? It seems like that would work, as long as you have the exit option there.
Currently, I made another thread a couple hours later and the situation still stands :

Ren'py reports that there are no issues or anything and then boom, it completely skips over the menu choices and thereafter
I've been trying to fix it. ;-;

User avatar
Dizzydude
Regular
Posts: 58
Joined: Mon May 26, 2014 8:40 pm
Projects: 「To Be Announced」
Location: U.S.A
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#12 Post by Dizzydude »

FruitSeller wrote:
Currently, I made another thread a couple hours later and the situation still stands :

Ren'py reports that there are no issues or anything and then boom, it completely skips over the menu choices and thereafter
I've been trying to fix it. ;-;

Huh. Well, are there multiple choices before the menu? Did you make sure they all jump to the menu?

FruitSeller
Newbie
Posts: 19
Joined: Sun Jun 22, 2014 2:46 pm
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#13 Post by FruitSeller »

Dizzydude wrote:
FruitSeller wrote:
Currently, I made another thread a couple hours later and the situation still stands :

Ren'py reports that there are no issues or anything and then boom, it completely skips over the menu choices and thereafter
I've been trying to fix it. ;-;

Huh. Well, are there multiple choices before the menu? Did you make sure they all jump to the menu?
There weren't any multiple choices before, everything before that menu works perfectly fine.
I'm trying some 'new' things out to see what works.

User avatar
Dizzydude
Regular
Posts: 58
Joined: Mon May 26, 2014 8:40 pm
Projects: 「To Be Announced」
Location: U.S.A
Contact:

Re: Invalid Syntax Error for Menu Choice (SOLVED)

#14 Post by Dizzydude »

FruitSeller wrote:
Dizzydude wrote:
FruitSeller wrote:
Currently, I made another thread a couple hours later and the situation still stands :

Ren'py reports that there are no issues or anything and then boom, it completely skips over the menu choices and thereafter
I've been trying to fix it. ;-;

Huh. Well, are there multiple choices before the menu? Did you make sure they all jump to the menu?
There weren't any multiple choices before, everything before that menu works perfectly fine.
I'm trying some 'new' things out to see what works.


Strange. Well, good luck with your VN/hope you get the problems sorted out, and see you in OT.
EDIT: I think I saw an issue in your other thread.. not sure, but hopefully my answer helps.

Post Reply

Who is online

Users browsing this forum: No registered users