JSON http help? Catalog hat search?
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
01 | Cmd( 4 , 'Search Http Hat' , 'Sh' , 'Search Hats From HttpService' , '<returns Service value>' , function (Owner,Msg) |
02 | if not V 3 [ 'HttpEnabled' ] = = true then |
03 | Tablet(Owner, 'Please Enable HttpService!' , function () |
06 | local KeyWords = game:service 'HttpService' :UrlEncode(Msg) |
08 | local Assets = game:service 'HttpService' :JSONDecode(game:service 'HttpService' :GetAsync(Url)) |
10 | Tablet(Owner,Assets [ i ] .Name, function () |
12 | Tablet(Owner, 'Insert ' ..Assets [ i ] .Name.. '?' , function () |
13 | local x = game:service 'InsertService' :LoadAsset(Assets [ i ] .Assets) |
14 | for _,v in pairs (x:GetChildren()) do |
15 | if v:IsA( 'Accoutrement' ) then |
17 | v.Parent = Owner.Character |
21 | table.insert(V 3 [ 'HatLogs' ] , { IDN = Owner.Name,NAME = Assets [ i ] .Name,ID = Assets [ i ] .AssetId } ) |
22 | Tablet(Owner, 'Now Inserting ' ..Assets [ i ] .Name, function () Dismiss(Owner) end ) |