for i,something in somelse do -- ERROR? or WHATs happening?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • paul186
    Forum Member
    • Jan 2006
    • 82

    for i,something in somelse do -- ERROR? or WHATs happening?

    Hi all, every time i have to do this code to search a string in a table like:
    for i,something in somelse do

    My app get error, why? is it a bug?

    for example in this thread:

    i download the TEST.APZ maked by T3STY, opened it with ams8 and get the following error:

    Error: Attempt to call a table value
    Stack Traceback:
    1:[Page1 -Z On Show]Line 3 in main chunk

    and that line contains:

    Code:
    for i, drives in tDrives do

    whats happening? and why is only in my AMS8? any idea of how can i solve it?

    Thanks to all and sorry for this inconvenience.. im always asking you...
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5095

    #2
    Originally posted by paul186 View Post
    Thanks to all and sorry for this inconvenience.. im always asking you...
    You could check the documentation or search the forums before posting. This is clearly documented and has been discussed before.

    Ulrich

    Comment

    • Imagine Programming
      Indigo Rose Customer
      • Apr 2007
      • 4248

      #3
      My browser now contains a macro for answering this question Nah, would be cool tho...


      Change it to:
      Code:
      for i, drives in pairs(tDrives) do

      You gotta use that in table loops as from Lua 5.1. Next time, read the documentation.
      Bas Groothedde
      Imagine Programming :: Blog

      AMS8 Plugins
      IMXLH Compiler

      Comment

      • paul186
        Forum Member
        • Jan 2006
        • 82

        #4
        Originally posted by Imagine Programming View Post
        My browser now contains a macro for answering this question Nah, would be cool tho...


        Change it to:
        Code:
        for i, drives in pairs(tDrives) do

        You gotta use that in table loops as from Lua 5.1. Next time, read the documentation.

        thank you very much!. now it works perfect.

        next time i will see documentation before asking, i didnt spect big differents from ams7 but now i see that i was wrong. AMS8 is cool!

        Comment

        Working...
        X