I have a Trello API script and it used to work. Now I keep getting errors saying:
18:56:03.797 - Can't convert to JSON 18:56:03.799 - Script 'Players.Player.PlayerGui.TeamChange.CallAnAdmin.MainScript', Line 33 18:56:03.800 - Stack End
And I never changed the script before this. Now nothing works, help please?
The script:
--Search --Script --Code --Stuff --Here (Would have taken up 5 lines) local Gui = script.Parent local Abuser = script.Parent.Abuser local Desc = script.Parent.Desc local Call = script.Parent.Call local Sent = script.Parent.Sent local Enter = [[ ; ]] local MarketService = game:GetService("MarketplaceService") local GI = MarketService:GetProductInfo(game.PlaceId) local Player = script.Parent.Parent.Parent.Parent local ListID = "55307ad62211032b2a47bb6c" local Add = "?key=aded73d328dce4a0698a6744856b3326&token=" local Token = "--[[PRIVATE--]]" local HS = game:GetService("HttpService") local Thingy = Add..Token Call.MouseButton1Down:connect(function() local Url = "https://api.trello.com/1/cards/"..Thingy local data = { name = "Game: "..GI.Name.." || From: "..Player.Name, desc = "***Caller:*** "..Player.Name..Enter.."***Accused Abuser:*** "..Abuser.Text..Enter.."***Description:*** "..Desc.Text..Enter.."***Game Link:*** ".."http://www.roblox.com/games/"..game.PlaceId.."/GameLink", idList = ListID, pos = "bottom", } local Data = HS:JSONEncode(data) local Post = HS:PostAsync(Url,Data) local Read = HS:JSONDecode(Post) Desc.Text = "Brief Description" Abuser.Text = "Abuser's Name" Sent.Visible = true Call.Visible = false wait(5) Gui.Visible = false Sent.Visible = false Call.Visible = true end)
You're probably pulling in some strange unicode characters from one or more sources. Perhaps a player's name has some abusive characters in it? Non-printable characters? I got it to break with the Registered trademark symbol (R), on Windows: ALT+0174 (®)
Sanitize the data first. Then JSONEncode.
Best, debugd