Error with music.register_channel syntax? [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
User avatar
Reikun
Miko-Class Veteran
Posts: 565
Joined: Tue Dec 20, 2011 9:57 pm
Completed: Mnemonic Devices, Ciikos Bridge, Helena's Flowers, The Madness
Projects: Fox in the Hollyhocks
Organization: skyharborr
itch: skyharborr
Contact:

Error with music.register_channel syntax? [solved]

#1 Post by Reikun »

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 73: expected '=' not found.
    define renpy.music.register_channel("ambient", mixer="music", loop=True, stop_on_mute=True, tight=True, buffer_queue=True)
                                       ^

Ren'Py Version: Ren'Py 7.2.2.491
Sat Apr 06 22:16:51 2019
Apologies if this has an obvious solution /__\ I'm not sure what I'm doing wrong here with this statement. This is before the start label and I'm not sure where this expected " = " is supposed to be ?__? Any help/pointers appreciated.
Last edited by Reikun on Sun Apr 07, 2019 8:32 pm, edited 1 time in total.
ImageImageImage

fastest way to contact me: DM @skyharborr on twitter

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: Error with music.register_channel syntax?

#2 Post by XxrenxX »

Code: Select all

init python:
    renpy.music.register_channel("ambient","sfx",stop_on_mute=True, tight=True, buffer_queue=True)

label start:
    play ambient "rainstorm_outside.wav"
Found from here.

Hope this will fix the issue.

User avatar
Reikun
Miko-Class Veteran
Posts: 565
Joined: Tue Dec 20, 2011 9:57 pm
Completed: Mnemonic Devices, Ciikos Bridge, Helena's Flowers, The Madness
Projects: Fox in the Hollyhocks
Organization: skyharborr
itch: skyharborr
Contact:

Re: Error with music.register_channel syntax? [solved]

#3 Post by Reikun »

That worked! Thank you so much XxrenxX. I guess I need to brush up on my search skills haha
ImageImageImage

fastest way to contact me: DM @skyharborr on twitter

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]