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.
-
Lezalith
- Regular
- Posts: 82
- Joined: Mon Dec 21, 2015 6:45 pm
-
Contact:
#1
Post
by Lezalith » Mon Apr 03, 2017 6:24 pm
Hope you're all having a nice morning/afternoon/evening.
I have a button with an action.
Code: Select all
button:
xanchor 0.5
yanchor 0.5
xpos 50
ypos 200
xsize 100
ysize 100
action PauseAudio("main_screen", value=True),PauseAudio("ambience", value=True),PauseAudio("noise", value=True)
For some reason it gives me the error in post's title. Any advice?
Last edited by
Lezalith on Tue Apr 04, 2017 12:41 pm, edited 1 time in total.
-
indoneko
- Miko-Class Veteran
- Posts: 528
- Joined: Sat Sep 03, 2016 4:00 am
-
Contact:
#2
Post
by indoneko » Mon Apr 03, 2017 6:52 pm
Shouldn't you use [ ] for multiple action? And add some spacing, like this :
action [PauseAudio("main_screen", value=True), PauseAudio("ambience", value=True), PauseAudio("noise", value=True)]
-
Lezalith
- Regular
- Posts: 82
- Joined: Mon Dec 21, 2015 6:45 pm
-
Contact:
#3
Post
by Lezalith » Tue Apr 04, 2017 8:56 am
Brackets and spacing makes stuff more organized, but it shouldn't be required.
In vast majority of my buttons, I don't use either and they work just fine ._.
-
xela
- Lemma-Class Veteran
- Posts: 2481
- Joined: Sun Sep 18, 2011 10:13 am
-
Contact:
#4
Post
by xela » Tue Apr 04, 2017 11:24 am
Check if your Ren'Py is up to date. Brackers are not required as Python will automatically create a tuple for you.
Like what we're doing? Support us at:

Users browsing this forum: Google [Bot], _ticlock_