options.rpy - keyword can't be an expression!

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
Limone
Newbie
Posts: 3
Joined: Fri Apr 13, 2012 1:13 pm
Contact:

options.rpy - keyword can't be an expression!

#1 Post by Limone »

Hello there, everyone!
I'm fairly new to Ren'Py, and I have a problem with my game already.
The thing is, my main menu seemed so plain, it was imagemapped but there was no music, so I decided to add some.
I searched for the code on Ren'Py Wiki and finally found it in the FAQ, but it practically ruined my project.
After adding it, the error was:
File "game/options.rpy" line 82, invalid syntax
When I tried to comment it out (it was gm = "#hexcode" and I thought it wasn't really needed because of the custom main menu), it gave the same error, but on line 86.
After commenting out both:
Name [...] is defined twice: at game/options.rpy:244 and game/options.rpy:248.
I tried making a new project and putting only the customised dialogue box, some save locations, names etc. so it would be fairly 'pure'.

And I just still can't figure it out! ;A;
Could someone help me please?
Error message.
Error message.
options.rpy
(8.39 KiB) Downloaded 133 times

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: options.rpy - keyword can't be an expression!

#2 Post by SleepKirby »

You're getting this error when you launch the game, right?

I put that options.rpy in a new project, and the game starts without errors for me (well, at least it does when I put an apple.ttf in the game directory)...

- Are there any other .rpy files you've changed besides options.rpy?
- What version of Ren'Py are you using?

Limone
Newbie
Posts: 3
Joined: Fri Apr 13, 2012 1:13 pm
Contact:

Re: options.rpy - keyword can't be an expression!

#3 Post by Limone »

Ren'Py 6.13.11.1715

Besides options.rpy, I changed screen.rpy (added Music Room code from Cookbook and modified because the Return button took me to the start of the game instead of the main menu. changed the "return" command to $ renpy.full_restart() <- this actually worked before changing main menu bgm)
Putting it in a new project works now, thank you! I'm still looking forward if it'll work after adding the script and screens.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], Ocelot