For x = 1,maxn,30 do – reads a table every 30 fields
Na=a[x]…“;”
String = string…na
End
Any help on this problem would be so helpful as I can no further until this has been solved. I am trying to create a string with every 30th field
Cheers
For x = 1,maxn,30 do – reads a table every 30 fields
Na=a[x]…“;”
String = string…na
End
Any help on this problem would be so helpful as I can no further until this has been solved. I am trying to create a string with every 30th field
Cheers
If you want to add the string to itself:
String = String..Na
Variables are case sensitive. It should also be for not For and end not End.
@Jazmal I think this is what your asking. If not, let me know.
function setup()
tab={}
for z=1,1000 do -- create a table with 1000 entries
table.insert(tab,"entry "..z)
end
str="" -- initialize str
for x=1,#tab,30 do -- read every 30th entry
str=str..tab[x] -- append each 30th entry to the previous one
end
print(str) -- print selected entries
end
for x = 1,#a do
if x%30 == 0 then
print("30th Field!")
Na=a[x]..";"
String = String..Na
end
end
Thanks for the quick response and problem has now been sorted.
On to the next problem