Page 1 of 1

table.next()

Posted: Thu Aug 03, 2017 4:33 pm
by Nekyia
Hello,

I was looking the source of this platformer engine : https://yal.cc/love2d-platformer-engine/
In the love.load() we can see level.next()
I have no idea what this line does. It is the same as this : https://www.lua.org/manual/2.4/node31.html ?

Can you explain me what it does ?

Thank you.

Re: table.next()

Posted: Thu Aug 03, 2017 9:15 pm
by bartbes
It doesn't refer to any inbuilt functionality, the (specific) table 'level' contains a function called 'next'. You can find its definition in stages.lua.

By the way, that's a very old version of the documentation for lua 2.4. Love uses luajit by default, which is compatible with lua 5.1.

Re: table.next()

Posted: Sat Aug 05, 2017 10:35 am
by Nekyia
Thought I cancelled my post...
Don't know how I could miss the next function in stages.lua.
Thanks for the info !