Icy North Technologies Forum Index Icy North Technologies
User Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Attempt to call a table value

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Icy North Technologies Forum Index -> Language
View previous topic :: View next topic  
Author Message
Ratchet



Joined: 19 Jul 2006
Posts: 10

PostPosted: Thu May 10, 2007 3:21 am    Post subject: Attempt to call a table value Reply with quote

If I run following code with Lua 5.1.1 I got the message "attempt to call a table value":

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


What's wrong here?
Back to top
View user's profile Send private message
lhf



Joined: 20 Feb 2006
Posts: 175
Location: Rio de Janeiro, Brazil

PostPosted: Thu May 10, 2007 5:23 am    Post subject: Reply with quote

This is obsolete syntax. Use "for key,col in pairs(selcols)".
Back to top
View user's profile Send private message Visit poster's website
Ratchet



Joined: 19 Jul 2006
Posts: 10

PostPosted: Thu May 10, 2007 5:51 am    Post subject: Reply with quote

Thx!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Icy North Technologies Forum Index -> Language All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group