Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Issue with "..data.." in Trello script?

Asked by 9 years ago

So, I've got the script up and running, however when I add in the ..data.. variable into the Trello link the Text from TypeIdea.Text doesn't post to the Trello, only the Players name does. The Trello Key and Token have been removed for security as they are private keys.

name = script.Parent.Parent.Parent.Parent.Name
data = script.Parent.Parent.IdeaGUI.TypeIdea.Text

function Post()
    game:service'HttpService':PostAsync("https://api.trello.com/1/cards?key=KEY&token=TOKEN&name="..name.."&desc="..data.."&idList=LISTID",game.HttpService:JSONEncode({"true"}))
end

script.Parent.MouseButton1Down:connect(Post)

1 answer

Log in to vote
0
Answered by
bobder2 135
9 years ago

Use ..game:service'HttpService':UrlEncode(data).. instead of ..data.. this will replace spaces and things with %<hexcode> so it can be used in a url bar basically. If that's not the only cause of the problem, copy paste the error it gives you.

0
The problem is with the script recognizing the Text value, the Trello already accepts the PostAsync request. Yet it posts only a card named correctly, not the correct card description which should be the value of Text. iRealizm 25 — 9y
Ad

Answer this question