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

JSON http help? Catalog hat search?

Asked by 10 years ago

I have a working Music command but for some reason this hat catalog search errors...

Any idea's why this is erroring? Im using the same code other then Im using a differant URL.

Error... Cant parse JSON

01Cmd(4,'Search Http Hat','Sh','Search Hats From HttpService','<returns Service value>',function(Owner,Msg)
02if not V3['HttpEnabled']==true then
03Tablet(Owner,'Please Enable HttpService!',function()
04Tablet(Owner,'https://www.youtube.com/watch?v=MJr-_1YVBr0',function() end) end)
05else
06local KeyWords=game:service'HttpService':UrlEncode(Msg)
07local Url='http://rproxy.tk/catalog/browse.aspx?CatalogContext=1&Subcategory=9&Keyword='..tostring(KeyWords)..'&LegendExpanded=true&Category=3'
08local Assets=game:service'HttpService':JSONDecode(game:service'HttpService':GetAsync(Url))
09for i=1,#Assets do
10Tablet(Owner,Assets[i].Name,function()
11Dismiss(Owner)
12Tablet(Owner,'Insert '..Assets[i].Name..'?',function()
13local x=game:service'InsertService':LoadAsset(Assets[i].Assets)
14for _,v in pairs(x:GetChildren()) do
15if v:IsA('Accoutrement') then
View all 27 lines...

1 answer

Log in to vote
1
Answered by
Mauvn 100
10 years ago

For each ROBLOX Asset there is a category;

So Audio is: &Category=9

Gear is: &Category=5

And Hat would be: &Category=8

So maybe do

2"&Category=8&LegendExpanded"
0
Hi Reilat so I guess see you at SB :3 MessorAdmin 598 — 10y
Ad

Answer this question