You are not logged in.

"mutesound()" is invalid

Sunday, September 20th 2020, 11:36am

"mutesound()" is invalid

Hi, klaus.

I tried "mutesound" in the following code snippet, but the message returned was always "false", is BUG?

Source code

```1
2
3
4
```
```ifnot(!plugin[soundinterface].tour_bg_sound_disable AND tour_soundson,
mutesound(tour_bg_sound,true);
);
trace('tour_bg_sound Muted? ',get(sound[tour_bg_sound].muted));```

Regards to you.

Professional

Sunday, September 20th 2020, 1:38pm

ifnot(! is a double negate

Sunday, September 20th 2020, 8:12pm

Hi,

I can confirm - yes, there is a bug in the mutesound() action (internally a simple typo).
That will be fixed in the next release.

As alternative you could use:

Source code

```1
```
`set(sound[tour_bg_sound].muted, true);`

That's exactly the same that mutesound(tour_bg_sound) would do.

Best regards,
Klaus

Monday, September 21st 2020, 4:59am

Quoted from "indexofrefraction"

ifnot(! is a double negate

You're right, logically wrong, and I also find this statement hard to understand, so I change
"tour_bg_sound_disable"
to
"tour_bg_sound_on",
which was much better

Source code

```1
2
3
```
```if(plugin[soundinterface].tour_bg_sound_on AND tour_soundson,
mutesound(tour_bg_sound,true);
);```

Monday, September 21st 2020, 5:02am

Quoted from "klaus.krpano"

Hi,

I can confirm - yes, there is a bug in the mutesound() action (internally a simple typo).
That will be fixed in the next release.

As alternative you could use:

Source code

```1
```
`set(sound[tour_bg_sound].muted, true);`

That's exactly the same that mutesound(tour_bg_sound) would do.

Best regards,
Klaus

Many thanks!