NewLua Fu7 , iterating through the contents of a table

User avatar
ISOTRON
Fusioneer
Posts: 154
Joined: Mon Aug 04, 2014 11:54 am
Location: Germany, Munich
Contact:

NewLua Fu7 , iterating through the contents of a table

#1

Post by ISOTRON » Tue Sep 30, 2014 4:08 am

I had a problem with my scripts, that are using old lua syntax, i want to share the answer from Stuart MacKinnon:
The issue is that:

for i, sv in svs do

is not valid. You need to use pairs() or ipairs() when iterating through the
contents of a table, for example:

for i, sv in ipairs(svs) do

See the description of pairs() and ipairs() here:

http://www.lua.org/manual/5.1/manual.html#5.1
btw: less the 5 minutes from sending the support ticket, to received the answer. Respekt! :!:

User avatar
tlittle
Posts: 33
Joined: Tue Aug 05, 2014 12:12 pm
Location: Chicago, USA
Been thanked: 1 time
Contact:

Re: NewLua Fu7 , iterating through the contents of a table

#2

Post by tlittle » Fri Oct 31, 2014 12:06 pm

Thank you for posting this, I was just experiencing that error when trying every single script I had previously written for Fusion 6 and was freaking out. Did they mention this publicly in any release notes for Fusion 7?