Music
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.
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.
-
- Newbie
- Posts: 5
- Joined: Tue Nov 19, 2019 10:31 pm
- Contact:
Music
Hi everyone, I'm having trouble getting music to stop. In my script I've had music begin just fine, but when I give the order for it to stop, this comes up
File "game/script.rpy", line 247: expected end of line
stop music"dedsecmusic.oog"
^
Ren'Py Version: Ren'Py 7.3.5.606
Tue Nov 19 21:33:37 2019
Any advice?
File "game/script.rpy", line 247: expected end of line
stop music"dedsecmusic.oog"
^
Ren'Py Version: Ren'Py 7.3.5.606
Tue Nov 19 21:33:37 2019
Any advice?
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3792
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Music
You don't need the file name, audio in renpy works via channels.
Also, is your file .oog or .ogg
Also, is your file .oog or .ogg
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 5
- Joined: Tue Nov 19, 2019 10:31 pm
- Contact:
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3792
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Music
Just to clarify, one channel can only play one audio file at a time (except the special "audio" channel)
The documentation can explain it better than I can.
https://www.renpy.org/doc/html/audio.html
https://www.renpy.org/doc/html/quicksta ... -and-sound
The documentation can explain it better than I can.
https://www.renpy.org/doc/html/audio.html
https://www.renpy.org/doc/html/quicksta ... -and-sound
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 5
- Joined: Tue Nov 19, 2019 10:31 pm
- Contact:
Re: Music
Sorry to bother you again, I'm getting this now.Imperf3kt wrote: ↑Wed Nov 20, 2019 10:21 pm Just to clarify, one channel can only play one audio file at a time (except the special "audio" channel)
The documentation can explain it better than I can.
https://www.renpy.org/doc/html/audio.html
https://www.renpy.org/doc/html/quicksta ... -and-sound
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 258, in script
"Raptor" "Well, here we are."
File "renpy/common/00library.rpy", line 268, in say
who(what, interact=interact, *args, **kwargs)
IOError: Couldn't find file 'newmarket.ogg'.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3792
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Music
Where did you place your file? You'll need to give renpy the full file path (relevant to the game folder)
So for example if you placed your music in a folder, you need to add the folder name to the path.
So for example if you placed your music in a folder, you need to add the folder name to the path.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 5
- Joined: Tue Nov 19, 2019 10:31 pm
- Contact:
Re: Music
Okay, so what do I type in for that?
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3792
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Music
Well, if you placed it in a folder named "sound" then you simply add "sound/" to the start of the filename when playing the file. A full line would look like the following:
But thats only if that is what your issue is. Without seeing more of your code, I can't really be sure. The traceback alludes to not being able to find the file, but thats all it tells you.
However, looking at your code again, it looks like you have two sets of "" in one line,
I assume "Raptor" is a character name? You don't require the " around it and infact having that will cause issues.
Code: Select all
play music "sound/whatever.ogg"
However, looking at your code again, it looks like you have two sets of "" in one line,
Code: Select all
"Raptor" "Well, here we are."
Code: Select all
Raptor "Well, here we are."
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: IrisColt