Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

If I loop through the table {hi = 1}, will v = hi or 1?

Asked by
Link43758 175
10 years ago

I was wondering this, as I need to know this when making my script.

0
In a for loop, "v" is only a convention. They are regular variables and can be called whatever they want. BlueTaslem 18071 — 10y

1 answer

Log in to vote
0
Answered by
Bebee2 195
10 years ago

Given you are using in pairs, the value is 1.

To reach that value, you have to index the table like table.hi

Ad

Answer this question