Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
_8j50
· 3y ago · 0 comments
I have no problem with Lua but you forgot to address how it starts counting array indexes at 1 not 0, or is that what your first point is addressing ?
Comments
[–]
caligian
3y ago
Yes. My point is that it should not matter because you can stick to table indexing with +-1 or create a function for the same
[–]
Joker_vD
3y ago
So what does this "simple function" look like?
[–]
caligian
3y ago
function mod0(x, y) return (x % y) + 1 end
Something like this? You replace % with mod0()