Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    http://www.indigorose.com/forums/thr...multiple+files
    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...

  • #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


    • #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 :: Like the Facebook page for up-to-date info regarding plugins!

      My AMS Plugins:
      iEnc - AMS7, Object - AMS7 - AMS8, PluginInfo - AMS7 - AMS8, VersionInfo - AMS8, ListIcon 2.1 - AMS8, ProgressEx - AMS8, SPLAX - AMS8, MemoryEx - AMS8, MemoryEx Lua Header Compiler - Info - 20,-, Draw - Info - 5,- NEW

      Comment


      • #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