Music Room code not working

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
User avatar
lsf22
Regular
Posts: 139
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Music Room code not working

#1 Post by lsf22 »

Linux-5.4.0-96-generic-x86_64-with-debian-bullseye-sid
Ren'Py 7.4.11.2266

I used the code example from the Renpy documentation to create a music room and it is not working.
1st was that it could not find the tracks even if it was placed in audio, im not sure if its normal for renpy to ignore that default folder for audio in game/audio.
2nd, after adding the /audio/ location Im now meet with an error of the following which brings an error screen after going into the music room from the main menu.

I have placed the exact code from the Renpy documentation https://www.renpy.org/doc/html/rooms.html#music-room into screens.rpy. Prior to that It was tested in its own script but it was meet with errors.

error:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/screens.rpy", line 1142, in execute
screen music_room:
File "game/screens.rpy", line 1142, in execute
screen music_room:
File "game/screens.rpy", line 1146, in execute
frame:
File "game/screens.rpy", line 1147, in execute
has vbox
File "game/screens.rpy", line 1150, in execute
textbutton "Track 1" action mr.Play("track1.ogg")
File "game/screens.rpy", line 1150, in keywords
textbutton "Track 1" action mr.Play("track1.ogg")
File "game/screens.rpy", line 1150, in <module>
textbutton "Track 1" action mr.Play("track1.ogg")
File "renpy/common/00musicroom.rpy", line 460, in Play
raise Exception("{0!r} is not a filename registered with this music room.".format(filename))
Exception: u'track1.ogg' is not a filename registered with this music room.

Post Reply

Who is online

Users browsing this forum: Google [Bot]