local musget = http:PostAsync(trello api request http:JSONEncode({["name"]=(plr.Name .. " | ".. plr.userId), ["desc"] = data,["due"]=nil,["idList"]=boardid,["urlSource"]=nil}))
The 'data' variable is all the questions combined in a variable. The thing is, the error says 'cannot convert to to json' when trying to jsonencode
. IF i change desc to lol, it sends the card to trello perfectly with the description 'lol'. I found a post on this made in 2015 on the roblox scripting forums, but there was no fix.
EDIT: Heres the code that makes data.
local data = "" for i=1, #module.Questions do data = data .. "\ ".. script.Parent.p3.ScrollingFrame["q"..i].TextLabel.Text .. ": ".. script.Parent.p3.ScrollingFrame["q"..i].TextBox.Text end
Printing data works as intended: prints the questions and answers to questions.
According to the Roblox wiki,
JSONEncode cannot encode anything other than strings, numbers, tables, and booleans - passing anything else to it will error.
That being said, in order for this script to work, you'd have to change ally our nil values into one of these types. Here's a version of your code where they're changed to strings:
local musget = http:PostAsync(trello api request http:JSONEncode({["name"]=(plr.Name .. " | ".. plr.userId), ["desc"] = data,["due"]="",["idList"]=boardid,["urlSource"]=""}))