Jump to content

Why this isn't working..


Recommended Posts

function isInTable(table, arg) 
    local result = false 
    for i = 1, #table do 
        if table[i] == arg then 
            result = true 
            break 
        end 
    end 
    return result 
end 

If I insert in the table "asd", and then use isInTable(the table, "asd") it will return false always, why? (I don't see any errors on code)

Thanks

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...