Lua Fehler: attempt to call a table value

Ace

Grünschnabel
Wenn ich folgendes Script mit Lua 5.1.1 ausführe bekomme ich die Meldung "attempt to call a table value":

Code:
selcols={"col1", "col2"}
for key,col in selcols do
  print(col)
end

Was ist daran bloß falsch?
 
Hi.

Probier's mal mit einem Iterator:[lua]selcols={"col1", "col2"}
for key,col in ipairs(selcols) do
print(col)
end[/lua]
Gruß
 

Neue Beiträge

Zurück