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

What is the next() function?

Asked by
RafDev 109
8 years ago

I'm sorry if this isn't the type of question directed to ScriptingHelpers, but I'd really like to understand the next() function.

I've searched on the wiki, tested it, but still don't understand what it does.

If someone could explain to me, that'd be great.

1 answer

Log in to vote
1
Answered by 8 years ago

basically if youre talking about tables then it makes it so it moves the the next thing in a table, like this

things = {1,2,3,4,5}

print(next(things, 2)

-- so it will print 3 because after the second argument is 3. now if i do

print(next(things, 3)

-- it will be 4, and so on
0
Could we use print(Next(Next(thing 2))? raspyjessie 117 — 8y
0
Alright thanks RafDev 109 — 8y
Ad

Answer this question