Invalid argument #3 to 'find' (number expected, got string)

  1. What do you want to achieve?
    Answer to the title.

  2. What is the issue?
    Titles name.
    invalid argument #3 to ‘find’ (number expected, got string)

  3. What solutions have you tried so far?
    Looked on devforum but none has the same error as mine.

Also i am using ProfileService and if you need more of the code then ill give it but this is where i got the error from.

local profile = dataManager.Profiles[plr]
if not profile then return end
			
if not table:find(profile.Data.OwnedTools, tool.Name) then -- error location

else
1 Like

It’s table.find() not table:find()

The colon does table.find(table, arg1, arg2) but the dot does table.find(arg1, arg2)

4 Likes

Bro im glad it was just a silly mistake,
but if you can, do you know how i would show a tables values in a folder?

Edit: Nvm found out how

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.