Announcement

Collapse
No announcement yet.

Compare read values with fixed in a loop?

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

  • Compare read values with fixed in a loop?

    Hi there...

    is it possible to compare read values with fixed in a loop?


    Code:
    function _test(path)
    
    sINI = {"file_ab.ini","file_cd.ini","file_ef.ini","file_gh.ini"};
    sCOMP = {"AB", "CD", "EF", "GH"};
    brands = "";
    
    
        for j,k in pairs(sINI) do
         
            if File.DoesExist(path .. "\\MyProg\\" .. k) then
             
                rINI = INIFile.GetValue(path .. "\\prog\\" .. k, "SECTION", "value")
                 if (rINI ~= "") and [(additional compare rINI value with sCOMP before set to brands. I mean if value from eg file_ab.ini also AB)] then
                     brands = brands..rINI..",";
                 end
         
            end
        end
    
    end
Working...
X