local SearchKeyword = string.lower(tostring(Input))
CurrentTable = {}
for categoryindex,category in pairs(Catalog) do
if category ~= "Skintones" then
for subcategoryindex,subcategory in pairs(category) do
for index,value in pairs(subcategory) do
local stringword = subcategory[index].Name
if string.find(stringword,SearchKeyword) then
print("Found")
table.insert(CurrentTable,value)
end
end
end
end
end
Really unsure what could be triggering it, the code looks just fine. It’s basically a search system to find similar items with same name elements, but I basically made it so it avoids the category “Skintones” in the beginning. Color3 isn’t being used at all.
Yeah; printing out subcategories works out totally fine. When I just introduce that error line I posted above, it keeps bringing up the error. I can mask it any way I want, it’ll still reproduce it.
Actually, I just printed out the category and it seems that it did pull a whole Color3 table from Skintones. How’s that possible if I filtered it out tho?
Actually, the error might be right here. Instead of category, it needs to be categoryindex, since category is not a string, therefore this line probably doesn’t function correctly.
Actually I see the issue here, .Name is a property for parts and whatnot, so the script is reading .Name as a property and not a table index. try doing subcategory[index]["Name"]
Yeah, the dot can also be used, just like dolphin said. But, regardless, it still doesn’t resolve the issue.
I put in so many prints, no number is being used at all, yet it does register things that are matching up with the search text. The error keeps popping up tho.
Your right, what I mentioned is an issue that used to be prevalent years ago but I guess its been fixed, albeit I will still always use name with a lowercase N
I’ve been reading this topic a little while watching you all discuss it and I’m confused as to why no one asked to see the Catalog variable, it seems to be very important in resolving this issue.