Jump to content

[help] Find position of the specific value in table


monday

Recommended Posts

You can also do it like this;

local selectedIndex = mytable[3]; 
-- Will return 996 

It works similarily if your table has another table inside of it. IE;

local myTable = {{1, 2, 3}, {"A", "B", "C"}, {1, 2, 3}}; 
local selectedIndex = myTable[2][3]; 
-- Will return C 

Edit:

Nevermind, just saw that you wanted to find the position of it :P

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...