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

Help with HttpService?

Asked by 8 years ago

I used the article on using httpService to get someone's reputation, and changed it up so it instead went to my API website (which contains data for various topics for HttpService), and it does not work, but instead I get the following error: "Workspace.Part.SurfaceGui.TextLabel.Script:7: attempt to index local 'sniper' (a nil value)"

Here's the sourcecode I used, go look at my website if you want to:

while wait() do
local link  = "http://thundermaker300.wix.com/apiwebsite" -- We will Concatenate the link and the    name. 
    local Service = game:GetService("HttpService")
    local html = Service:GetAsync(link, false)
    local text = [[<p class="font_8">%d+</p>]]
    local sniper = html:match(text)
    local Reputation = (sniper:match("%d+"))
script.Parent.Text = Reputation
end

The password to the website is: thunderisthundr

Please respond below with how to fix this. Thanks! (In case your going to say, HttpService is enabled)

0
Have you been paying attention to what you're doing? Your link is useless for this script. User#6546 35 — 8y
0
What do you mean? Thundermaker300 554 — 8y
0
You're not concatenating crap User#6546 35 — 8y

Answer this question