I'm trying to use a module script that returns a string value, but I keep getting an error and can't find the problem.
Here's the error I am receiving
Requested module experienced an error while loading
Here's the module script it was requesting
ap = require(game.Workspace.TrelloAPI)
trello = ap:GetBoardID("Judicial Security Applications")
newList = ap:GetListID("New Applications",trello)
reviewList = ap:GetListID("Reviewing Applications",trello)
passedList = ap:GetListID("Passed Applications",trello)
failedList = ap:GetListID("Failed Applications",trello)
reviewAppList = ap:GetListID("Reviewing Appeals",trello)
passedAppList = ap:GetListID("Passed Appeals",trello)
failedAppList = ap:GetListID("Failed Appeals",trello)
appsN = ap:GetCardsInList(newList) --applications
appsR = ap:GetCardsInList(reviewList)
appsP = ap:GetCardsInList(passedList)
appsF = ap:GetCardsInList(failedList)
apsR = ap:GetCardsInList(reviewAppList) --appeals
apsP = ap:GetCardsInList(passedAppList)
apsF = ap:GetCardsInList(failedAppList)
function getStatus(id)
local status
status = "none:-"
for i,v in pairs(appsN) do
if v.name:match("(.*):"..id) then
status = "pending:application"
end
end
for i,v in pairs(appsR) do
if v.name:match("(.*):"..id) then
status = "review:application"
end
end
for i,v in pairs(appsP) do
if v.name:match("(.*):"..id) then
status = "passed:application"
end
end
for i,v in pairs(appsF) do
if v.name:match("(.*):"..id) then
status = "failed:application"
end
end
for i,v in pairs(apsR) do
if v.name:match("(.*):"..id) then
status = "review:appeal"
end
end
for i,v in pairs(apsP) do
if v.name:match("(.*):"..id) then
status = "passed:appeal"
end
end
for i,v in pairs(apsF) do
if v.name:match("(.*):"..id) then
status = "failed:appeal"
end
end
return status
end
return getStatus
|