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

How do I return a card from a list in trello?

Asked by 6 years ago

This is a remotefunction that returns the card title if it matches the description. It is a plate checker gui.

"Bad Argument #1 to "pairs"

Picture of Error

local RemoteFunction = game.ReplicatedStorage:WaitForChild("PlateCheck")
local api = require(game.ServerScriptService.TrelloApi)
local http = game:GetService('HttpService')

function RemoteFunction.OnServerInvoke(player, name)
    print(player.Name.." has requested a license plate check on "..name)
    return runPlate(name)
end

function runPlate(plateid)
    print('Running!')
    local BoardID = "NOam6vK4"
    local CivListID = "5915109538d7681805173541"
    print('Still running!')
    local getlist = "its a page of trello cards on a list"
        for i,v in pairs(getlist) do 
        local thing = ("***Custom Plate:*** "..v.desc)
        if plateid == thing then
            return v.name
        else 
            return "Plate does not exist!"
        end 
    end
end
2
To use a for i,v in pairs loop you have to give it a table. You have given it a string, getList. iddash 45 — 6y
0
I have fixed this, post no longer needed. policetonyR 0 — 6y

Answer this question