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

Application With Trello API Won't Work? Why Not?

Asked by 5 years ago

I couldn't figure out what was wrong with the scripts I and GUI I just spent around 3 hours on, so I came here to see if you guys knew! I'll check the answers in the morning, so sorry if I can't reply.

Local Script:

01script.Parent.Activated:Connect(function()
02    script.Parent.Text = "Sending Information..."
03    local Q1 = script.Parent.Parent.Q1.Text
04    local Q1A = script.Parent.Parent["Q1 Answer"].Text
05    local Q2 = script.Parent.Parent.Q2.Text
06    local Q2A = script.Parent.Parent["Q2 Answer"].Text
07    local Q3 = script.Parent.Parent.Q3.Text
08    local Q3A = script.Parent.Parent["Q3 Answer"].Text
09    local Event = game.ReplicatedStorage.TrelloSend
10    local Player = game.Players.LocalPlayer.Name
11    Event:FireServer(Player.Name,Q1,Q1A,Q2,Q2A,Q3,Q3A)
12end)

Server Script:

1local Event = game.ReplicatedStorage.TrelloSend
2local API = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
3local BoardId = API:GetBoardID("Applications")
4Event.OnServerEvent:Connect(function(Plr,Q1,Q1A,Q2,Q2A,Q3,Q3A)
5    local LR = API:GetListID("LR Application",BoardId)
6    API:AddCard("Application",Plr..": "..Q1.." "..Q1A.." "..Q2.." "..Q2A.." "..Q3.." "..Q3A,LR)
7end)

Output: 22:08:56.087 - ServerScriptService.Proccesser:6: attempt to concatenate local 'Q1' (a nil value)

Thanks for reading, and possibly answering.

0
By the way, the error was for line 6 of the server script. FrostedFlakes67 71 — 5y
0
For some reason, Q1 is nil, which is why you can't concat it (using ..). Check all args/answers for nil values and, if found, replace with a blank string before you concat. whenallthepigsfly 541 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

You're providing the wrong arguments to your :FireServer() the first argument you pass is the player name, which in your case is game.Players.LocalPlayer.Name.Name, that's nothing and should've errored. You should remove that argument since the player in your server script is automatically passed by roblox internally to the OnServerEvent.

Ad

Answer this question