Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Song Handler Attempt to concatenate field?

Heya!

So Im making a Trello Music System and I keep receiving this error:

http://prntscr.com/g2a9oj

I have tried multiple things and cant seem to find a fix, its driving me insane!

Here is the code within the error:


while wait() do		
	SongNum = SongNum+1
	local RawSong = Songs[SongNum]
	local Song = "http://www.roblox.com/asset/?id="..Songs[SongNum]
	if Song ~= LastSong then
		game:GetService("ContentProvider"):Preload(Song)
		local Sound = Instance.new("Sound", game.Workspace)
		Sound.Volume = 1
		Sound.SoundId = Song
		Sound:Play()
		game.ReplicatedStorage.Events.SongChanged:FireAllClients(game:service('MarketplaceService'):GetProductInfo(tonumber(RawSong)).Name)
		wait(120)
		Sound:Stop()
		wait()
		Sound:remove()
		NotPlaying = false
	else
		NotPlaying = false			
	end
end	

1 comment

0

The problem is likely occuring on line 4 (of the code you posted). Make sure SongNum is a valid key of the table Songs before concatenating.

1 answer

✓ Accepted answer

Fixed in TeamCreate. His loop on the returned JSON table wasn't pulling the correct pattern from his Trello card.

This discussion is preserved as it was. New answers, comments, and votes are closed.