Trello API Help

Hi so I am using Trello’s API to add a card but its not working.

local rep = game:GetService("ReplicatedStorage")
local SSS = game:GetService("ServerScriptService")
local API = require(SSS.API)
rep.Give.OnServerEvent:Connect(function(productName, userID)
	print("fired")
	local listName = tostring(productName)
	print("1")
	local userId = tostring(userID)
	print("2")
	local board = API:GetBoardID("ezHub")
	print("3")
	local list = API:GetListID(listName, board)
	print("4")
API:AddCard("New: "..userId, "Desc:"..userId, list, nil, "top")
end)
print("done")

I added a print by each action, and 1-4 printed, but not the word done, and the card wasnt added!

1 Like

Are you getting any errors in the output from the module? (I’m assuming you’re using Nstrikes API based on the parameters you’re using)

If you’re using NStrikes API I would recommend this one Instead

1 Like

I would recommend using better variables for your code, just as it will help you in the future. (Somewhat unrelated I know).

local rep = game:GetService("ReplicatedStorage")
local SSS = game:GetService("ServerScriptService")

SSS is an ok variable but it could be better. If I picked up your code and was reviewing it, I would have no clue what SSS is, or what rep is. Making code readable for others is also important!

‘done’ will print before 1,2,3,4, because it is outside the connection. So it will print after the script acknowledges the connection you made. But it will not print after fire after that connection is fired and activated from the serverEvent.

image This is my error