So I get the error Only assignment, call, increment, decrement, and new object expressions can be used as a statement
in this code
public void sound (string sound)
{
if (GetComponent<AudioSource> ().isPlaying) {
GetComponent<AudioSource> ().Stop;
} else {
GetComponent<AudioSource> ().Play;
}
}
I want to alternate between stopping and playing the song when a button is pressed. I know this is probably wrong, so how can I do it right?