Index is the Interval, and Value is the value of the table. i and v are just variables for index and value. You can change them to whatever you'd like. Here's how pairs would look in a while loop:
local tab = {"one","two","three","four","five"}
local i = 0
while i < #tab do
i = i + 1
v = tab[i]
end
Here's an example of how the variables can be changed:
local admins = {"Player","Player1","aquathorn321","TheContinentofEurope"}
local admin == "aquathorn321"
for number, player in pairs(admins) do
if player == admin then
print(admin.." Is an admin!")
end
end
5 comments
So it can be Named anything, As long as it is in order?
Yes, it can, they can be anything.
What if I wanted to just use the Value instead of the Index? Would I have to add a "_, Index"?
Thanks anyways!
Using "i,v" is the same as "_,v". You can leave the index if you don't need it.