Page 1 of 1

Error with music.register_channel syntax? [solved]

Posted: Sun Apr 07, 2019 4:18 am
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.

Re: Error with music.register_channel syntax?

Posted: Sun Apr 07, 2019 6:12 am
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.

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

Posted: Sun Apr 07, 2019 8:33 pm
by Reikun
That worked! Thank you so much XxrenxX. I guess I need to brush up on my search skills haha