String Concatenation

I have this code that builds a URL for doing API requests:

Function buildURL(channel As String, token As String, sig As String) as String
  Return "https://usher.twitch.tv/api/channel/hls/" + channel + ".m3u8?player=twitchweb&token=" + token + "&sig=" + sig "&allow_audio_only=true&allow_source=true&type=any&p=" + "7333049"
end Function

But it won’t compile. This is the error I’m getting:

*** ERROR compiling /pkg:/source/main.brs:

Syntax Error. (compile error &h02) in pkg:/source/main.brs(37)

I initially thought that there was something going on with string not being mutable so I changed it to this, but I still get the same syntax error:

Function buildURL(channel, token, sig) as String
  Return "https://usher.twitch.tv/api/channel/hls/" + channel.tostr() + ".m3u8?player=twitchweb&token=" + token.tostr() + "&sig=" + sig.tostr() "&allow_audio_only=true&allow_source=true&type=any&p=" + "7333049"
end Function

both are missing a + after the sig variable.

Ah I feel like a real idiot, thank you!

No sweat. I’ve done it. :grinning_face_with_smiling_eyes: