redditing Posted April 21, 2020 Posted April 21, 2020 I wanted to ask if there is a way to check what index the value in the table is for example, t = {} table.insert(t,"Hello") table.insert(t,"HELLO") table.insert(t,"HI") if index==1 and value=="HI" then -- false --do something elseif index==0 and value=="HELLO" then --false --do something elseif index==2 and value=="HI" then --true --do something else --etc. --do something end --If someone does not distinguish the index from the value then the index is for example [0,1,2,3 ...] and the value is an element for example print(t[1]) -------------> 'HELLO'
KronoS Lettify Posted April 21, 2020 Posted April 21, 2020 You can use loops Página Facebook: The News Joker (The Piadas & News) Discord: @kronos.lettify em Discord oficial do MTA Dê um THANKS se minha ajuda ou comentário foi útil para você.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now