Heyhoi! I somehow can't find the issue in this script I am trying to create:
local application = [[
{
"ApplicationName":"Moderator Application",
"Desc":"Apply to become a moderator on hundreds of games today!"
}
]]
local questions = [[
{
"Why do you want this job??",
"Why should we hire you over others?"
}
]]
local httpservice = game:GetService("HttpService")
application = httpservice:JSONDecode(application)
questions = httpservice:JSONDecode(questions)
print(application.Desc)
script.Parent:WaitForChild("Frame").Start.ApplicationName.Text = application.ApplicationName
script.Parent.Frame.Start.Information.Text = application.Desc
for i = 1,#questions do
print("Started!")
local clone = script.Parent.Frame.QuestionTemplate:Clone()
clone.Parent = script.Parent.Frame
clone.Name = "Question" .. script.Parent.Frame.CurrentQuestionNumber.Value
clone.Question.Text = application.questions[i]
end
The first JSONDecode works fine, the second one gives an error: 23:43:03.027 - Can't parse JSON 23:43:03.029 - Stack Begin 23:43:03.029 - Script 'Players.marketmanager1.PlayerGui.ScreenGui.LocalScript', Line 18 23:43:03.029 - Stack End
I suspect the error is in the Json 'questions', but I have no idea what's wrong. The reason I am not using JSON Keys is because I want an array. ;)
Thanks in advance, Jonas
