generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Trello API helop

Previous Thread :: Next Thread 
mircostaff is not online. mircostaff
Joined: 28 Sep 2012
Total Posts: 288
07 Dec 2015 12:43 PM
Hey, I'm making a script that allows users to summit a feedback, which sends it right to a trello board (private). I'm quite new to http in Rbx.Lua, but I still can't figure why it's erroring. Could you guys help me out? I know what I got my token and key right.


Script:

local HS = game:GetService("HttpService")

descb = script.Parent.Text
plr = script.Parent.Parent.Parent.Parent
--function below
function AddCard(Name, List, Desc)

local NewCard = {}

NewCard.Name = plr .. [[**'s Feedback **]]
NewCard.desc = descb.Text
NewCard.key = KeyHere (This is a private board, so I have to "block" the key)
NewCard.token = TokenHere (This is a private board, so I have to "block" the token)

local ACEncode = HS:JSONEncode(NewCard)

HS:PostAsync(List.."/Feedback", ACEncode)

end
-- button script below


script.Parent.MouseButton1Down:connect(function()
AddCard()
end)


After testing it in Studio and a server, I got this error.

13:39:10.914 - Players.Player.PlayerGui.ScreenGui.FeedbackFrame.SummitButton.Script:10: attempt to concatenate global 'plr' (a userdata value)
13:39:10.917 - Stack Begin
13:39:10.919 - Script 'Players.Player.PlayerGui.ScreenGui.FeedbackFrame.SummitButton.Script', Line 10 - global AddCard
13:39:10.920 - Script 'Players.Player.PlayerGui.ScreenGui.FeedbackFrame.SummitButton.Script', Line 24
13:39:10.921 - Stack End
Report Abuse
mircostaff is not online. mircostaff
Joined: 28 Sep 2012
Total Posts: 288
07 Dec 2015 12:44 PM
Trello API Help*

I should have spell-check the title :|
Report Abuse
Skyman772 is not online. Skyman772
Joined: 20 Mar 2012
Total Posts: 9305
07 Dec 2015 01:10 PM
Change plr's value to game.Players.LocalPlayer
Report Abuse
Skyman772 is not online. Skyman772
Joined: 20 Mar 2012
Total Posts: 9305
07 Dec 2015 01:11 PM
Also NameCardName seems to be using plr in the string so I'm guessing you're gonna want Plr.Name, since Plr is an Object (userData) value and plr is a String (which would be compatible in a Name string)
Report Abuse
mircostaff is not online. mircostaff
Joined: 28 Sep 2012
Total Posts: 288
07 Dec 2015 01:34 PM
I did change plr to game.Players.LocalPlayer. As for the plr.Name, I'll try it.
Report Abuse
mircostaff is not online. mircostaff
Joined: 28 Sep 2012
Total Posts: 288
07 Dec 2015 01:38 PM
wow, I see my problem. My scripting was correct, but somehow I forgot to make it plr.userId and plr = script.Parent.Parent.Parent.Parent.Parent (it's in a server script :|). Such a noob mistake on my end.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image