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.
For the past few days, I've been trying to no avail to get sound effects to play when I select the buttons on the menu, and have gotten nothing but errors. My latest attempt was met with yet another error:
File "game/options.rpy", line 68: end of line expected.
style button.activate_sound = "select.wav"
^
I'm not sure what I've been doing wrong. Could someone more experienced help me out? I've tried so many different codes, but none of them have worked for me. I'm pretty sure that it isn't a problem with the audio file itself: it's in the right place, and I tried the same code with sounds that I already have working, and they don't do anything, either.
File "game/screens.rpy", line 33: expected 'simple_expression' not found.
activate_sound = "select.wav"
^
I copied this error from the 'screens' script, but I also got the same error in the 'options' script, and the 'gui' script, which I tried just to be sure.
Just FYI, there in no difference if particular piece of code is in specific file or not. Likewise names of files does not mean anything to RenPy itself. You can just copy-paste content of all files into new file, delete originals, and it still will work.