function updateres(ret)
local sel = nil
for _,v in pairs(ui.CatResults:GetChildren()) do
if v:IsA(“ImageLabel”) and v.Name ~= “BlankFrame” then
v:Destroy()
end
end
for _,v in pairs(ret) do
local new = ui.CatBlank:Clone()
new.Name = v[1]
new.Button.Image = “http://www.roblox.com/Thumbs/Asset.ashx?width=110&height=110&assetId=”…v[3]
new.Button.ID.Value = v[3]
new.Button.MouseButton1Click:Connect(function()
ui.CatID = v[3]
ui.CatName = v[1]
if sel ~= nil then
sel.ImageColor3 = Color3.fromRGB(255,255,255)
sel.BorderPixel.ImageColor3 = Color3.fromRGB(150,150,150)
end
new.ImageColor3 = Color3.fromRGB(170, 170, 255)
new.BorderPixel.ImageColor3 = Color3.fromRGB(100, 100, 150)
sel = new
end)
new.Visible = true
new.Parent = ui.CatResults
end
ui.CatID = 0
ui.CatOther = Color3.fromRGB(255,255,255)
end
local list = {
[“Category”] = “Accessories”,
[“PageNumber”] = 1
}
local ret = gevs.Items:InvokeServer(list)
updateres(ret)
error: invalid argument #1 to ‘pairs’ (table expected, got nil)
This is part of a longer script, the error is the line in bold. I’m not that great at scripting - someone else made these scripts for me but this was the only line showing an error.
any help would be appreciated